Skip to content

pyronear/pyro-api

Pyronear API

CI Status Test coverage percentage black

PyPi Status Docker Image Version pyversions license

The building blocks of our wildfire detection & monitoring API.

The API stores access metadata (Users, Cameras, Organizations), the core wildfire-monitoring workflow (Detections grouped into Sequences), and client integrations (Webhooks). End to end, an alert flows like this: an admin registers a user, the user registers a camera and mints a camera token, then the camera uploads a picture as a detection, which is grouped into a sequence over a dense time window. For the full data model, UML diagram, codebase tour and developer setup, see CONTRIBUTING.md.

Quick Tour

Two ways to run the stack, depending on whether you just want to use the API or to develop against it.

As a user (no local Python tooling needed)

Pull the published ghcr.io/pyronear/alert-api image and start the stack:

cp .env.example .env
docker compose pull
docker compose up

Then navigate to http://localhost:5050/docs to interact with the API and explore the OpenAPI documentation.

To stop the service:

docker compose down

As a contributor (builds locally with UV)

make run

This builds the backend image from uv.lock. See CONTRIBUTING.md for the full developer setup, tests, and migration workflow.

To stop the service:

make stop

Installation

Prerequisites

Contributors building the image locally also need UV; see CONTRIBUTING.md.

First-time setup

git clone https://github.com/pyronear/pyro-api.git && cd pyro-api
cp .env.example .env
make venv

Then run the stack as described in the Quick Tour above.

More goodies

Python client

This project is a REST-API, and you can interact with the service through HTTP requests. However, if you want to ease the integration into a Python project, take a look at our Python client.

Contributing

Any sort of contribution is greatly appreciated!

CONTRIBUTING.md covers more than the contribution guidelines: it also documents the data model, codebase structure, developer setup, testing workflow and database migrations. Start there if you want to understand how the project is organised.

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

About

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors