Python scripts that get the weather data from different providers and save it in a common format into mongodb. This project use Google Cloud APIs to compute any missing station details (altitude, name, timezone, ...). Google Cloud API results are cached with redis.
- Docker
- Google Cloud API key
- Providers secrets (optional)
Create an .env
file from .env.template
read by docker compose:
cp .env.template .env
In .env
:
- fill GOOGLE_API_KEY with you own Google Cloud API key
- optionally fill the missing secrets for each provider you want to test
docker compose -f compose.services.yaml up
docker compose up
Or, run only a specific provider:
PROVIDER=ffvl docker compose up
Some providers need winds-mobi-admin running to get stations metadata.
- Homebrew
- Python 3.10
- Poetry 1.7.1
- Google Cloud API key
- Providers secrets (optional)
Create an .env.localhost
file from .env.localhost.template
read by dotenv
for our local commands:
cp .env.localhost.template .env.localhost
In env.localhost
:
- fill GOOGLE_API_KEY with you own Google Cloud API key
- optionally fill the missing secrets for each provider you want to test
Install libraries with homebrew:
brew install libpq
brew install mysql-client
poetry install
poetry shell
You must already have the .env
file created in the previous section.
docker compose -f compose.services.yaml up
dotenv -f .env.localhost run python run_scheduler.py
Or, run only a specific provider:
dotenv -f .env.localhost run python -m providers.ffvl
Some providers need winds-mobi-admin running to get stations metadata.
Format python code:
black .
Run the linter tools:
flake8 .
isort .
You know good quality weather stations that would be useful for many paraglider pilots or kitesurfers?
Awesome! Fork this repository and open a pull request with your new provider code. It's easy, look at the following example: providers/example.py
winds.mobi is licensed under the AGPL License, Version 3.0. See LICENSE.txt