Skip to content

Latest commit

 

History

History
 
 

openaq_api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OpenAQ API

The OpenAQ API, located in the openaq_api, is built using Python 3 and FastAPI. It takes advantage of Pydantic for data validation.

Installation

It is recommended to install in a python virtual environment.

pip install -e .[dev]

A convenience executable is included to run a local development version of the API. You must have your environment set up (Setting up your Environment) prior to running.

OPENAQ Version 2 Ingest

The ETL process for the Version 2 Database is split into two parts. The ingest code is designed to load data that has been fetched and normalized by either OpenAQ Fetch or OpenAQ LCS Fetch into an s3 bucket.

After installing the Ingest Lambda, it is required to add a cloudwatch cron trigger (every 5 minutes recommended) and an s3 event trigger on the S3 Fetch Bucket. These can both be done from the AWS Lambda web console.