Uhalifu API is a fast REST API powered by FastAPI that enables users to retrieve data for countries affected by terrorism.
- 🐍 Python - v3.12 or higher is required
- 🗃️ uv
- FastAPI — async high-performance API framework
- SQLAlchemy — ORM for database interactions
- uv — dependency & environment manager
- SQLite — storage backend
Follow these steps to run the app successfully:
- Clone the Project
git clone https://github.com/morikeli/uhalifu-api.git
cd uhalifu-api- Using uv Install dependencies from pyproject.toml:
uv syncIf you wish to install new dependencies run this command:
uv add <package-name>Note
You can also install multiple packages separated by spaces.
For example:
uv add <package-1> <package-2> <package-3> <package-4>If you don't wish to use Docker to run the app, you can use the following commands:
Run server:
uv run fastapi devYou can also use this command to run the development server
uvicorn main:app --reloadAPI documentation is available at:
- Swagger UI →
http://localhost:8000/api/v1/docs - Redoc →
http://localhost:8000/api/v1/redoc
Important
If you wish to apply linting or script formatting using uv, run the following commands:
uv run ruff check .
uv run ruff format .- Fork the repo
- Create a feature branch
- Commit changes with clear messages
- Submit a pull request
- Follow existing code style & project structure
Open issues anytime for bugs, feature suggestions, or discussions.