|
|
1 месяц назад | |
|---|---|---|
| .. | ||
| .hypothesis | 1 месяц назад | |
| routers | 1 месяц назад | |
| schemas | 1 месяц назад | |
| services | 1 месяц назад | |
| test | 1 месяц назад | |
| .env.example | 1 месяц назад | |
| README.md | 1 месяц назад | |
| SAMPLE_DATA_README.md | 1 месяц назад | |
| database.py | 1 месяц назад | |
| init_image_annotation_data.py | 1 месяц назад | |
| init_sample_data.py | 1 месяц назад | |
| main.py | 1 месяц назад | |
| models.py | 1 месяц назад | |
| pytest.ini | 1 месяц назад | |
| requirements.txt | 1 месяц назад | |
| test_annotation.py | 1 месяц назад | |
FastAPI-based backend for the annotation platform.
Install dependencies:
pip install -r requirements.txt
Configure environment variables (optional):
cp .env.example .env
# Edit .env with your configuration
Development mode:
python main.py
Or with uvicorn directly:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
Once the server is running, visit:
backend/
├── main.py # FastAPI application entry point
├── database.py # Database connection and initialization
├── models.py # Database models
├── requirements.txt # Python dependencies
├── routers/ # API route handlers
├── services/ # Business logic
└── schemas/ # Pydantic schemas for validation
The application uses SQLite for data storage. The database file is created automatically on first run.
Default location: annotation_platform.db
To use a custom location, set the DATABASE_PATH environment variable.
Run tests with pytest:
pytest