1.6 KiB
1.6 KiB
The_DisExcel_project
A FastAPI project combining Excel and digital data ("The Great Excel project that is going to be built from Excel and digital projects").
Stack
- Python >= 3.13
- FastAPI + Uvicorn / Gunicorn
- SQLAlchemy 2.0 (async) + Alembic (migrations)
- PostgreSQL (asyncpg, psycopg2)
- Pydantic 2 / Pydantic Settings
- Poetry — dependency management
- Docker, Ansible — deployment
Architecture
src/
├── database/ # DB CRUD operations
├── errors/ # HTTP errors
├── logging/ # logging middleware
├── migrations/ # Alembic migrations
├── models/ # Pydantic and SQLAlchemy models, configs
├── reports/ # reports
├── service/ # business logic (auth, users_crud)
└── web/ # routes (protected_routes)
Layers are connected top to bottom: web → service → database → models.
Authentication
- JWT access + refresh tokens
- Refresh token is stored in the DB as a SHA256 hash, with rotation and revocation support
- Passwords are hashed with bcrypt
- RBAC: direct user permissions + permissions via groups, checked through
require_permissions()
Testing
tests/
├── unit/
├── integrated/
└── e2e/
Uses pytest, pytest-asyncio, pytest-cov, pytest-mock, allure-pytest.
Installation
poetry install
Running migrations
alembic upgrade head
CI/CD
Pipeline is set up via Gitea Actions (.gitea/workflows/ci.yml).
Deployment
The repository includes ready-made docker/ and ansible/ configs for containerization and deployment.
License
MH.Dmitrii's project