Two APIs working together:
- .NET API — handles the database and delegates to the Python API
- Python (FastAPI) — interfaces with Python packages such as pyagrum
Python API (Python 3.12+)
pip install poetry
poetry install
uvicorn src.main:app --port 8080.NET API (.NET 8)
cd PrismaApi
dotnet build
dotnet runRun both APIs together with Docker Compose from the repository root.
- Docker Desktop (or Docker Engine + Compose)
AZURE_AD_CLIENT_SECRETset in your shell
export AZURE_AD_CLIENT_SECRET="your-secret"docker compose up --builddocker compose downdocker compose build --no-cache
docker compose upThe API stores SQLite at /data/Prisma.db in the api-data named volume.
Remove containers and volume (full DB reset):
docker compose down -v- The
apiservice runs as root in Docker Compose for local development to avoid SQLite write-permission issues on the named volume. - Normal
docker compose downkeeps your SQLite data. Use-vonly when you want to reset it.
Migrations use Entity Framework Core with separate projects for SQLite and SQL Server (docs).
Using scripts (recommended — syncs both providers at once):
| Script | Purpose |
|---|---|
scripts/Add-Migrations.sh |
Add migration to SQLite and SQL Server |
scripts/Remove-Last-Migration.sh |
Remove the last migration |
scripts/Update-Sqlite-Database.sh |
Apply migrations to SQLite |
scripts/Update-SqlServer-Database.sh |
Apply migrations to SQL Server |
Usage instructions are at the top of each script file.
Manually (from PrismaApi/):
dotnet ef migrations add YourMigrationName --project ./SqliteMigrations/SqliteMigrations.csproj --startup-project ./PrismaApi.Api/PrismaApi.Api.csproj -- --provider=sqlite
dotnet ef migrations add YourMigrationName --project ./SqlServerMigrations/SqlServerMigrations.csproj --startup-project ./PrismaApi.Api/PrismaApi.Api.csproj -- --provider=sqlserver