bcn-rainfall-api-client
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
# You can replace base_url with your own instance URL if you have one running
base_url = "https://bcn-rainfall-api.onrender.com/rest"
# Instantiate client
api_clt = APIClient(base_url=base_url)
# Have fun with client!
data = api_clt.get_rainfall_average(
time_mode="yearly",
begin_year=1991,
end_year=2020
)
print(data)
...
About time-related parameters
time_mode = "monthly"
month = "may"
season = "winter"
assert time_mode in ["yearly", "seasonal", "monthly"]
assert month in ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
assert season in ["winter", "spring", "summer", "fall"]
Metadata
Release files for bcn-rainfall-api-client 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bcn_rainfall_api_client-1.0.9.tar.gz | 17.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bcn_rainfall_api_client-1.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / bcn_rainfall_api_client-1.0.9.tar.gz
| Download URL | bcn_rainfall_api_client-1.0.9.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fe55b7109ebad29d635e8dfa10a50fcd812b0d2102dddffa5d72d0375053ab2
|
|
BLAKE2b-256 checksum How to use checksums |
65dfd16b558c3cd5ff3541bb09912cbf38a80df0dc781cfb39800ecd52ad3133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|
Release files / bcn_rainfall_api_client-1.0.9-py3-none-any.whl
| Download URL | bcn_rainfall_api_client-1.0.9-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a6cf733813e88047bfa3ded1497ab19ebf05a00d3bc34a39b8466035fd0dbb3
|
|
BLAKE2b-256 checksum How to use checksums |
06f6b677cb04c0145c3a79cab80725c5cd8b9ffde6bda66a1215795d152193dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|