clean-architecture-fastapi-project-template
Clean architecture FastAPI project template
File Explorer
Download Latest Version (.zip)- pull_request_template.md
- installation.rst
- quickstart.rst
- environment-variables.rst
- makefile-commands.rst
- architecture.rst
- changelog.rst
- conf.py
- index.rst
- license.rst
- Makefile
- README.md
- requirements.txt
- post_gen_project.py
- docker.md
- environment.md
- migrations.md
- mypy-usage.md
- ruff-usage.md
- init-db.sh
- init-db.sql
- init-mysql.sql
- init-sqlite.sh
- migrate.sh
- setup-env.sh
- __init__.py
- artifact.py
- __init__.py
- cache.py
- db_mapper.py
- http_clients.py
- mappers.py
- message_broker.py
- repositories.py
- serialization.py
- uow.py
- __init__.py
- fetch_artifact_from_museum_api.py
- get_artifact_from_cache.py
- get_artifact_from_repo.py
- process_artifact.py
- publish_artifact_to_broker.py
- publish_artifact_to_catalog.py
- save_artifact_to_cache.py
- save_artifact_to_repo.py
- __init__.py
- exceptions.py
- mappers.py
- __init__.py
- di.py
- providers.py
- __init__.py
- app.py
- base.py
- broker.py
- cors.py
- database.py
- external_apis.py
- logging.py
- redis.py
- settings.py
- __init__.py
- artifact.py
- __init__.py
- __init__.py
- era.py
- material.py
- __init__.py
- exceptions.py
- __init__.py
- publisher.py
- __init__.py
- redis_client.py
- __init__.py
- artifact_db_mapper.py
- artifact_uow_mapper.py
- c3cca8a62218_initial_migration_create_artifacts_table.py
- __init__.py
- env.py
- script.py.mako
- __init__.py
- artifact.py
- __init__.py
- artifact.py
- __init__.py
- exceptions.py
- session.py
- uow.py
- uow_new.py
- __init__.py
- clients.py
- __init__.py
- artifact.py
- __init__.py
- __init__.py
- artifact_controller.py
- __init__.py
- artifact_mapper.py
- __init__.py
- responses.py
- __init__.py
- exceptions.py
- routers.py
- __init__.py
- error_handling.py
- middlewares.py
- __init__.py
- __init__.py
- __init__.py
- __init__.py
- main.py
- __init__.py
- test_process_artifact.py
- __init__.py
- __init__.py
- test_artifact.py
- __init__.py
- test_era.py
- __init__.py
- __init__.py
- test_artifact_model.py
- __init__.py
- __init__.py
- __init__.py
- test_api_integration.py
- __init__.py
- test_artifact_controller.py
- __init__.py
- __init__.py
- __init__.py
- conftest.py
- factories.py
- faker.py
- .dockerignore
- .git-commit-template
- .gitignore
- .pre-commit-config.yaml
- alembic.ini
- docker-compose.override.yml
- docker-compose.yml
- Dockerfile
- env.template
- Makefile
- pyproject.toml
- README.md
- .cookiecutterignore
- .editorconfig
- .gitignore
- .readthedocs.yaml
- CONTRIBUTING.md
- cookiecutter.json
- DOCUMENTATION.md
- LICENSE
- README.md
- renovate.json
# Installation Guide
git clone https://github.com/Peopl3s/clean-architecture-fastapi-project-template
Downloads the entire project code from GitHub to your computer.
cd clean-architecture-fastapi-project-template
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommended- Python 3 Python is required to use pip.
pip install --dependency-group dev
Installs the package published on PyPI directly โ no need to clone the source.
Pulled directly from this repo's README.
3. Docker
Easy- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
make dev-setup-docker
Compiles the code based on the generated build configuration to produce an executable.
make docker-up-dev
Compiles the code based on the generated build configuration to produce an executable.
โโโ docker-compose.yml # Docker services
Runs the command against the services defined in the compose file.
make docker-test # Run tests in Docker
Compiles the code based on the generated build configuration to produce an executable.
make docker-build # Build Docker image
Compiles the code based on the generated build configuration to produce an executable.
Pulled directly from this repo's README.
4. Python
Easypip install -r requirements.txt
Installs the Python libraries listed in requirements.txt (or similar).
pip install -e .
Installs the Python libraries listed in requirements.txt (or similar).
pip install --dependency-group dev
Installs the package published on PyPI directly โ no need to clone the source.
pip install -e ".[dev]"
Installs the Python libraries listed in requirements.txt (or similar).
pip list
Type this command into your terminal and run it.
Pulled directly from this repo's README.
5. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make dev-setup-docker
Compiles the code based on the generated build configuration to produce an executable.
make docker-up-dev
Compiles the code based on the generated build configuration to produce an executable.
make html
Compiles the code based on the generated build configuration to produce an executable.
make lint # Run linter
Compiles the code based on the generated build configuration to produce an executable.
make lint-fix # Fix linting issues
Compiles the code based on the generated build configuration to produce an executable.
Pulled directly from this repo's README.
