Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/surister/cratedb-weather-example
- Owner: surister
- Created: 2023-12-22T12:27:36.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-14T08:56:02.000Z (8 months ago)
- Last Synced: 2024-06-14T10:11:57.271Z (8 months ago)
- Language: Python
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```