- Clone the repository
git clone https://github.com/Maxioum/technical-test-dev-back-end-python-fast-api.git && cd technical-test-dev-back-end-python-fast-api
- Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh- Download dependencies
uv syncuv run uvicorn app.main:app --reloadExample request:
Here’s a set of simple curl examples you can use to interact with the app once it’s running (default at http://localhost:8000):
- Create a Ticket
curl -X POST "http://localhost:8000/api/v1/tickets" -H "Content-Type: application/json" -d '{"title": "Feature: Add Ticket Type", "description": "Add different types of ticket, such as feature, bug etc"}'- Get All Tickets
curl -X GET "http://localhost:8000/api/v1/tickets"- Get a Ticket by ID
(Replace 1 with the actual ID from the create response)
curl -X GET "http://localhost:8000/api/v1/tickets/1"4️. Update a Ticket
curl -X PUT "http://localhost:8000/api/v1/tickets/1" -H "Content-Type: application/json" -d '{"title": "Feature: Add Ticket Types"}'- Mark a Ticket as closed
curl -X PATCH "http://localhost:8000/api/v1/tickets/1/close" \
-H "Content-Type: application/json" \While the app is running visit:
docker compose up --build tickets-api- Install dev dependencies
uv sync --dev- Run tests
uv run pytest- Run tests with coverage
uv run pytest . --covuvx ruff check