This project is a proof-of-concept (POC) web API built using the FastAPI library.
This project uses uv for environment and dependency management.
To install, follow the official installation guide.
- Clone the Repo
git clone https://github.com/RMI/web-api-poc
cd web-api-poc
- Create and Activate the Virtual Environment
uv venv .venv
source .venv/bin/activate # macOS/Linux
- Install Dependencies
uv sync
uv run src/main.py
# build the image
docker compose build
# run the container
docker compose up
# do both
docker compose up --build
The API will be accessible at http://localhost.
Dependencies are managed using uv. To add a new library, run:
uv add <library>
Testing is implemented using the pytest
library. Run all tests locally with:
uv run pytest
Or, you can run specific test suites with:
uv run pytest tests/test_unit.py # to only run unit tests
uv run pytest tests/test_integration.py # to only run integration tests
For test-only dependencies, add them using:
uv add --dev <library>
This project follows the black code formatting standard. Lint code by running:
black path/to/file.py # to lint a single file
black . # to lint the entire directory
Ensure that your code is properly formatted before submitting a pull request.
TODO
This project is licensed under the MIT License