|
Some checks failed
Python Quality & Tests / Lint, Typecheck, and Test (push) Failing after 31s
|
||
|---|---|---|
| .github/workflows | ||
| doc | ||
| fooder | ||
| requirements | ||
| .dockerignore | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Makefile | ||
| mypy.ini | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| Readme.md | ||
| setup.cfg | ||
| setup.py | ||
| test.sh | ||
FOODER
Simple API for food diary application. It uses FastAPI and async postgres.
Overview and key points of configurating and deploying API
API is maily suited for being run as docker container, either via docker compose or inside kubernetes/openshift, tho no configuration for those are provided in this repository. Example docker-compose.yml for deployment is provided in doc/install/docker-compose.yml.
Configuration is passed through env variables. Sample configuration is provided in doc/install/env.template.
Database migrations are handled through alembic. For ease of use, doc/install/Makefile provides formula for make migrate that upgrades database to head migration.
Development
Project architecture design was summarized in ARCHITECTURE.md, altho summary was generated with usage of AI for now so might not be perfect or informative ;)
Overall, project consists of:
fooder/alembic- alembic python scripts, migrations, autogeneratedfooder/context- context with authorized session, repositoriesfooder/domain- sqlalchemy domain definitionsfooder/controller- controllers for domain models, controllers hold logic linked with only one modelfooder/repository- repositories for domain models, again single repo per model, altho because of joins there are some methods that touch more than one modelfooder/model- pydantic modelsfooder/view- fastapi routesfooder/utils- utilsfooder/app- fastapi app definitionsfooder/db- sqlalchemy database core functionalityfooder/recaptcha- recaptcha implementationfooder/exc- exceptions live therefooder/router- fastapi main routerfooder/settings- pydantic-settings for app