- Prerequisite:
uvis installed cd szeyap-api- Create the environment
uv venv venv - Activate it
source venv/bin/activateand sync ituv sync - Download the spaCy model
uv run --with spacy spacy download en_core_web_sm - Start the server:
uv run src/szeyapapi/api.py --reload - Access Swagger UI at
http://localhost:8000/api/ui
Each service exists as a separate Docker container, so you can run each separately or run using docker compose which will glue all the containers together and allow your client to communicate with your api, for example.
docker compose -f docker-compose.dev.yml build
docker compose -f docker-compose.dev.yml up
docker compose -f docker-compose.yml build
docker compose -f docker-compose.yml up
You may not want to run everything, ie if you are developing the discord bot you may not need to start the web container. You can launch with different profile configurations by passing in the --profile configuration. Profile names can be found in docker-compose.yml. As an example ...
docker compose --profile with-web-client up
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
