This is a simple project to demonstrate the usage of FastAPI.
Features:
- CRUD operations with PostgreSQL, Alembic and SQLAlchemy, Asyncio support.
- FastAPI
- Authentication with OAuth2 (Azure AD )
- Unit tests
- Docker Compose
- Alembic migrations
- CORS enabled
- dotenv config
- CI/CD with GitHub Actions
- Dapr
- Add one more service
conda env create --p ./.conda -f conda.yml
conda config --set env_prompt '({name})'
conda activate ./.conda
You need run data migration first to make sure the database is ready.
docker-compose up -d --build
pip install -r app/requirements.txt
uvicorn app.main:app --reload --port 8000
You can then open the website at http://localhost:8000
alembic init -t async migrations
alembic revision --autogenerate -m "init"
alembic revision --autogenerate -m "add new tables"
alembic upgrade head
python -m pytest ./tests