A small package to ingest a OpenAQ SQS queue.
|
|
vor 6 Jahren | |
|---|---|---|
| openaq_ingestion | vor 6 Jahren | |
| .gitignore | vor 6 Jahren | |
| README.md | vor 6 Jahren | |
| requirements.txt | vor 6 Jahren | |
| settings.example.yaml | vor 6 Jahren | |
| setup.py | vor 6 Jahren | |
| test.py | vor 6 Jahren |
Copy settings.example.yaml to settings.yaml and set a valid database uri for storage.
Set up AWS credentials in ~/.aws/ by using for example aws configure (if you have the AWS CLI installed).
This package expects an SQS queue named openaq in the eu-west-1 region.
Two tooling entry points are defined:
initdb: initialize the database with the required table for openaq measurements.processqueue: a utility to ingest the messages of the openaq queue:
Usage: processqueue [OPTIONS]
Options: --amount INTEGER Amount of messages to fetch. --delete BOOLEAN Delete messages from the queue after successful storage. --help Show this message and exit.