- FastAPI framework.
- Interactive API documentation
- Full Docker integration.
- Docker Compose integration.
- Production ready Python web server using Uvicorn.
- Secure password hashing by default.
- JWT token authentication.
- SQLAlchemy models
- CORS (Cross Origin Resource Sharing).
- Small utility to paginate SqlAlchemy queries.
- Docker ๐ณ
- docker-compose ๐ณ
- Python 3.6+ ๐ To use without docker
git clone https://github.com/JeremyAndress/fastapi-docker.git
- Create .env files
cp .env.example .env
You should now have a directory structure like:
.
โโโ compose
โย ย โโโ local
โย ย โโโ production
โย ย โโโ scripts
โย ย โโโ stage
โโโ nginx
โย ย โโโ site.conf
โโโ requirements
โย ย โโโ local.txt
โย ย โโโ migrations.txt
โย ย โโโ mysql.txt
โย ย โโโ postgre.txt
โย ย โโโ production.txt
โย ย โโโ test.txt
โโโ screenshots
โย ย โโโ ui.png
โโโ src
โย ย โโโ alembic
โย ย โโโ api
โย ย โโโ core
โย ย โโโ db
โย ย โโโ logs
โย ย โโโ models
โย ย โโโ __pycache__
โย ย โโโ schemas
โย ย โโโ tests
โย ย โโโ utils
โย ย โโโ alembic.ini
โย ย โโโ main.py
โย ย โโโ pre_start.py
โย ย โโโ prestart.sh
โโโ CHANGELOG.md
โโโ LICENSE
โโโ .env.example
โโโ .flake8
โโโ local.yml
โโโ production.yml
โโโ pytest.ini
โโโ README.md
โโโ stage.yml
docker-compose -f local.yml build
docker-compose -f local.yml up -d
- That's just all, api server is listen at http://localhost:8030/docs now
You will see the automatic interactive API documentation (provided by Swagger UI):
pytest -vvs src/tests/