Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/surister/cratedb-weather-example

Example of how to periodically aggregate weather data from an api to CrateDB
https://github.com/surister/cratedb-weather-example

Last synced: 8 days ago
JSON representation

Example of how to periodically aggregate weather data from an api to CrateDB

Awesome Lists containing this project

README

        

## Simple project to showcase how simple it is to aggregate data to CrateDB

![architecture](img/arch.svg)

The project uses the Crate's [sqlalchemy](https://cratedb.com/docs/python/en/latest/sqlalchemy.html)
dialect and the python's [scheduler](https://docs.python.org/3/library/sched.html), it runs everything
synchronously.

Every 60s (time can be changed) it will make a https request to the weather api and insert it
into CrateDB.

### Setup
Get your api key in https://www.weatherapi.com/

### How to run in docker compose
Fill up the environment variables in the docker-compose.yml
```
docker compose up -d
```