Installation
pip install dmiapi
Data available
- observations
- forecasts
Usage
The wrapper supports both synchronous and asynchronous methods.
Synchronous example
import pandas as pd
import dmiapi
client = dmiapi.DmiApiClient()
obs_response = client.observations(station_id = 2619856)
obs = pd.DataFrame(obs_response['observations'])
print('Mean temperature (2 meters above ground):', obs['temperature2m'].mean())
Asynchronous example
import pandas as pd
import dmiapi
async def max_forecast_temp():
client = dmiapi.DmiApiClient()
forecasts_response = await client.async_forecasts(location_id = 2619856)
forecasts = pd.DataFrame(forecasts_response['forecasts'])
print('Forcasted max. temperature:', forecasts['temp'].max())
Release files for dmiapi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dmiapi-0.1.2.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dmiapi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / dmiapi-0.1.2.tar.gz
| Download URL | dmiapi-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8297a9a1a8f4789bab0f9b13344ca1ae8dfb21ca6455f0188c03bff5d72849a7
|
|
BLAKE2b-256 checksum How to use checksums |
7244c7d68dacb3b20336a8f5a5e7279ce8dc2bc8239a75aac764b09acaf592bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.2
|
Release files / dmiapi-0.1.2-py3-none-any.whl
| Download URL | dmiapi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9ebb7b7b6db24775e3990d890400597bc5e4b5635325074c2df0dae56f254dd
|
|
BLAKE2b-256 checksum How to use checksums |
db848a4067c1dbd38d537d9baa0512daf307ddcbbd91d53b1866b1dfb1c4d71a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.2
|