Python bindings to multiple weather station vendor APIs
Project description
Multi Weather API
Consistent Python bindings for select commercial weather station APIs, such as Zentra Cloud REST API v3, created for MSU EnviroWeather Project.
Background
This is inspired by python bindings for v1 of the Zentra API from the Montana Climate office : MSU Agricultural Weather Office
The EnviroWeather system from the MSU Agricultural Weather Office will interface with weather stations (select list of vendors) deployed and owned privately. Since each vendor has a differrent REST/Web API to access station's weather data, this package aims to provide a consistent interface to all of those stations in order to make it easy for incoporating them into a data pipeline.
Installation
The Multi-Weather API is currently available on PyPI. Install using pip
:
pip install multiweatherapi
Usage
>>> from multiweatherapi import multiweatherapi
>>> param = {'sn': 'STATION_ID',
... 'apikey': 'API_KEY',
... 'apisec': 'API_SECRET'}
>>> resp = multiweatherapi.get_reading('davis', **param)
>>> resp.resp_raw # raw JSON response of the reading
>>> resp.resp_parsed # parsed JSON response into list of dict for EnviroWeather project
Refer to the respective link below for parameter and authentication requirements of weather station vendor APIs
Supported Python Versions
Python 3.6 and higher are supported.
Supported Station Time Zones
Currently following time zones are supported:
Name | Description |
---|---|
HT | US/Hawaii |
AT | US/Alaska |
PT | US/Pacific |
MT | US/Mountain |
CT | US/Central |
ET | US/Eastern |
Requirements
Outputs
To be determined
License
Released under the MIT License
Testing the package
If you want to test without installing via PIP, there is a script
get_sample_data.py
in the main directory which requires a configuration file named '.env' in the root folder.
pip install -r requirements.txt
get_sample_data.py RAINWISE
see also docs/Test Suite Doco.py for more formal tests and how to provide station configuration file
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file multiweatherapi-0.0.19.tar.gz
.
File metadata
- Download URL: multiweatherapi-0.0.19.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c431ff789ecc43e52b779d15b5e81961deb73de445cd486a8a22c3dfc3de230 |
|
MD5 | 9e309f6047f4264fd9149a4df311f0d2 |
|
BLAKE2b-256 | 39cce38c0a4b470b8a9e9d7eb2f7bf79c52acd254b5fac40a519a62f832d78aa |
File details
Details for the file multiweatherapi-0.0.19-py3-none-any.whl
.
File metadata
- Download URL: multiweatherapi-0.0.19-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5dda47277ccd3a9f94e734d5eaa63d1de7d11cc90b3741b0be379b94f25ac62 |
|
MD5 | 5b9ebc9bc74b8ab727e44459b76b9024 |
|
BLAKE2b-256 | 9fead8422f874a362a756c07181b6dd9319721cb610dd1a9dae27f218ad24dec |