Cloudnet API client
Project description
cloudnet-api-client
Official Python client for the Cloudnet data portal API.
Installation
python3 -m pip install cloudnet-api-client
Quickstart
import cloudnet_api_client as cac
client = cac.APIClient()
sites = client.sites(type="cloudnet")
products = client.products()
metadata = client.metadata("hyytiala", "2021-01-01", product=["mwr", "radar"])
cac.download(metadata, "data/")
raw_metadata = client.raw_metadata("granada", date="2024-01", instrument_id="parsivel")
cac.download(raw_metadata, "data_raw/")
Documentation
APIClient().metadata() and raw_metadata() → [Metadata]
Fetch product and raw file metadata from the Cloudnet data portal.
Parameters:
| name | type | default | example |
|---|---|---|---|
| site_id | str |
"hyytiala" | |
| date | str or datetime.date |
None |
"2024-01-01" |
| date_from | str or datetime.date |
None |
"2025-01-01" |
| date_to | str or datetime.date |
None |
"2025-01-01" |
| updated_at_from | str or datetime.date |
None |
"2025-01-01" |
| updated_at_to | str or datetime.date |
None |
"2025-01-01" |
| instrument_id | str or [str] |
None |
"rpg-fmcw-94" |
| instrument_pid | str or [str] |
None |
"https://hdl.handle.net/21.12132/3.191564170f8a4686" |
| product* | str or [str] |
None |
"classification" |
| show_legacy* | bool |
False |
* = only in metadata()
Date Handling
The date parameter supports:
- "YYYY-MM-DD" — a specific date
- "YYYY-MM" — the entire month
- "YYYY" — the entire year
- Or directly as
datetime.dateobject
The date_from, date_to, updated_at_from and updated_at_to parameters
should be of form "YYYY-MM-DD" or datetime.date. Note that, if date is defined, date_from and date_to have no effect.
Return value
Both methods return a list of dataclass instances, ProductMetadata and RawMetadata, respectively.
APIClient().filter([Metadata]) → [Metadata]
Additional filtering of fetched metadata.
Parameters:
| name | type | default |
|---|---|---|
| metadata | [RawMetadata] or [ProductMetadata] |
|
| include_pattern | str |
None |
| exclude_pattern | str |
None |
| filename_prefix | str |
None |
| filename_suffix | str |
None |
| include_tag_subset | {str} |
None |
| exclude_tag_subset | {str} |
None |
APIClient().sites() → [Site]
Fetch cloudnet sites.
Parameters:
| name | type | Choices | default |
|---|---|---|---|
| type | str or [str] |
"cloudnet", "campaign", "model", "hidden" | None |
APIClient().products() → [Product]
Fetch cloudnet products.
Parameters:
| name | type | Choices | default |
|---|---|---|---|
| type | str or [str] |
"instrument", "geophysical", "evaluation" | None |
APIClient().instruments() → [Instrument]
Fetch cloudnet instruments.
cloudnet_api_client.download([Metadata])
Download files from the fetched metadata.
Parameters:
| name | type | default |
|---|---|---|
| metadata | [RawMetadata] or [ProductMetadata] |
|
| output_directory | PathLike or str |
|
| concurrency_limit | int |
5 |
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloudnet_api_client-0.1.3.tar.gz.
File metadata
- Download URL: cloudnet_api_client-0.1.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c76978cbb9b44e451c84f76cc8c6806e885c82dd11b94738b64a75618799ce85
|
|
| MD5 |
7bca5c8a102b44b60d6e97f8e1e0ed97
|
|
| BLAKE2b-256 |
c755811df895be3918187d24b8cfabc8e582c062c616738f25bdc26d75b0cf0b
|
Provenance
The following attestation bundles were made for cloudnet_api_client-0.1.3.tar.gz:
Publisher:
publish.yml on actris-cloudnet/cloudnet-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudnet_api_client-0.1.3.tar.gz -
Subject digest:
c76978cbb9b44e451c84f76cc8c6806e885c82dd11b94738b64a75618799ce85 - Sigstore transparency entry: 190181431
- Sigstore integration time:
-
Permalink:
actris-cloudnet/cloudnet-api-client@03794ca5338f43a1dda495cec8a9f3aacd6910c0 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/actris-cloudnet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03794ca5338f43a1dda495cec8a9f3aacd6910c0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cloudnet_api_client-0.1.3-py3-none-any.whl.
File metadata
- Download URL: cloudnet_api_client-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1d80b2b8df401395a645731d848dd7547e9b47fd8e95bad2ba438dde501b853
|
|
| MD5 |
40daaef31e05690722cc5a95b1946f37
|
|
| BLAKE2b-256 |
be1c55e6357f1cc1390f148a08f3bbd051085b902918fbfd9a98c1e37564e439
|
Provenance
The following attestation bundles were made for cloudnet_api_client-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on actris-cloudnet/cloudnet-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloudnet_api_client-0.1.3-py3-none-any.whl -
Subject digest:
b1d80b2b8df401395a645731d848dd7547e9b47fd8e95bad2ba438dde501b853 - Sigstore transparency entry: 190181434
- Sigstore integration time:
-
Permalink:
actris-cloudnet/cloudnet-api-client@03794ca5338f43a1dda495cec8a9f3aacd6910c0 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/actris-cloudnet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03794ca5338f43a1dda495cec8a9f3aacd6910c0 -
Trigger Event:
push
-
Statement type: