Did you know that GitHub supports table of contents by default 🤔
This is the API for viewing the booking status of rooms.
- Python 3.12 & Poetry
- FastAPI & Pydantic
- Formatting and linting: Ruff, pre-commit
- Deployment: Docker, Docker Compose, GitHub Actions
- Install Python 3.12+, Install Poetry
- Install project dependencies with Poetry.
poetry install
- Copy
settings.example.yaml
tosettings.yaml
cp settings.example.yaml settings.yaml
- Get credentials for EWS/Exchange.asmx and My University API, set them in
settings.yaml
- Start development server:
poetry run python -m src.api --reload
Follow provided instructions if needed
- Open in the browser: http://localhost:8000
The api will be reloaded when you edit the code
Important
For endpoints requiring authorization click "Authorize" button in Swagger UI
Tip
Edit settings.yaml
according to your needs, you can view schema in
config_schema.py and in settings.schema.yaml
We use Docker with Docker Compose plugin to run the service on servers.
- Copy the file with settings:
cp settings.example.yaml settings.yaml
- Change settings in the
settings.yaml
file according to your needs (check settings.schema.yaml for more info) - Install Docker with Docker Compose
- Build a Docker image:
docker compose build --pull
- Run the container:
docker compose up --detach
- Check the logs:
docker compose logs -f
- Run
poetry update
to update all dependencies - Run
poetry show --outdated
to check for outdated dependencies - Run
poetry add <package>@latest
to add a new dependency if needed
- Run
poetry run pre-commit autoupdate