Skip to main content

Client who serves routes from the Barcelona Rainfall API.

Project description

bcn-rainfall-api-client

License: MIT Ruff uv mypy

Client who serves routes from the Barcelona Rainfall API; it is recommended to use it to retrieve rainfall data instead of directly calling the API code.

Usage

from bcn_rainfall_api_client import APIClient
from bcn_rainfall_api_client.utils import APIClientSettings

# With configuration file in default path `config.yml`
api_clt = APIClient.from_config()

# With configuration file in other path
api_clt_with_path = APIClient.from_config(path="new/path/to/config.yml")

# With your own configuration
api_clt_with_cfg = APIClient.from_config(
    config_=APIClientSettings(host="localhost", port=8080, root_path="/api")
)

# Have fun with client!
data = api_clt.get_rainfall_average(time_mode="yearly", begin_year=1991, end_year=2020)
print(data)
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bcn_rainfall_api_client-1.0.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bcn_rainfall_api_client-1.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file bcn_rainfall_api_client-1.0.1.tar.gz.

File metadata

File hashes

Hashes for bcn_rainfall_api_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f51819f1344a90028aa662fd38af6663e9f0df7235ed45c1af34aede25c335ab
MD5 a6e9978e6094c7c65e62c64a51ffa782
BLAKE2b-256 1dbf7139f4fd22545bb7f7ee4a1a6441a70cdac8b1858b52681f737e055c8c8a

See more details on using hashes here.

File details

Details for the file bcn_rainfall_api_client-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bcn_rainfall_api_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8415a2201c27d937edb3f76abcd8c66d4eb85088de2d987e44fbc30f71f12f5a
MD5 3118933ee6550f91d9c4d652949a00d9
BLAKE2b-256 675c9e0f219276a8b25fa7f43c6deaa90400b0cb8470f63c87ba40b3e226bdb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page