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(
    cfg=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.2.tar.gz (19.1 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.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for bcn_rainfall_api_client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4160be0ff6e2f9a788226d1fe336a0f3fa0c0d90bdc4330c2fa559f0cca8fcb8
MD5 93d7f204259c9fc0b622b32a523a9208
BLAKE2b-256 0930cfcf6cf1955bb66cc7654f0e53924b5a469bc21277a62095a26fbb62ecb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bcn_rainfall_api_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 028658dee26ff3c208a1a590a0c6a6fc38edae218a1108ba4f9a27e90d082b3f
MD5 8b9db251a8d686cefb4e3e9605c5ab90
BLAKE2b-256 731ae5fbe60fa0a818306cebb2b5e35a6e67e53fa1345ec1f67e98a80ce952ce

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