Provides easy access to meteoblue dataset sdk.
Project description
Meteoblue Python Dataset SDK
Prerequisites
check default python version (e.g. on debian linux)
python --version
should equal more than 3.6
otherwise switch version with
update-alternatives --config python
as root
Usage / Test
qparams = {'units': {'temperature': 'C', 'velocity': 'km/h', 'length': 'metric', 'energy': 'watts'}, 'geometry': {'type': 'Polygon', 'coordinates': [[[7.313768, 46.982946], [7.313768, 47.692346], [8.621369, 47.692346], [8.621369, 46.982946], [7.313768, 46.982946]]]}, 'format': 'netCDF', 'timeIntervals': ['2000-01-01T+00:00/2019-01-04T+00:00'], 'timeIntervalsAlignment': 'none', 'queries': [{'domain': 'NEMSGLOBAL', 'gapFillDomain': None, 'timeResolution': 'hourly', 'codes': [{'code': 11, 'level': '2 m above gnd'}]}]}
from meteoblue_dataset_sdk import *
mb = MeteoblueDatasetClient(apikey='XXXXXXXXXXXXXXX') # ask for key
mb.query(qparams)
Build pip package
One time config
python -m pip --version
python -m pip install --upgrade pip setuptools wheel
python -m pip install tqdm
python -m pip install --user --upgrade twine
cat <<EOF > ~/.pypirc
[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = meteoblue
EOF
Update metadata in setup.py
setuptools.setup(
name="meteoblue-dataset-sdk", # Replace with your own username
version="0.0.2",
author="Jonas Wolff",
author_email="jonas.wolff@meteoblue.com",
description="Provides easy access to meteoblue dataset sdk.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/meteoblue/python-dataset-sdk",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)
Compile
python setup.py bdist_wheel
Upload
python -m twine upload --skip-existing dist/*
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
Close
Hashes for meteoblue_dataset_sdk-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e97f5439d11d06f55817572d0c20b76b470419e76dc4f5701d3c6ab3da9ee6 |
|
MD5 | 2851025baa0b60b67b3a503db7281c85 |
|
BLAKE2b-256 | 9433b6009f7bd6f082088592c8e7d9a9e50567f746dd5b3aac3b894698d90d7c |
Close
Hashes for meteoblue_dataset_sdk-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e6e292ed1f07a9a9121f98c0e1ff48538846eb0c2f149901e11d565d196c0ed |
|
MD5 | bebd06b0c6c491873c05eb58f0621a1d |
|
BLAKE2b-256 | 343577c2d32611b3ad550ae585843db0645e89dfa2c98e4e65f04e8aeb4206ec |