Skip to main content

Cloudnet API client

Project description

CI

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.date object

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


Download files

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

Source Distribution

cloudnet_api_client-0.1.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

cloudnet_api_client-0.1.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file cloudnet_api_client-0.1.2.tar.gz.

File metadata

  • Download URL: cloudnet_api_client-0.1.2.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

Hashes for cloudnet_api_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 350ab3df0e8b371fbfcc0b64710487ee292906076a58f210f0f7b6d6f7aeb72a
MD5 8a3bf59bfc1d4fc2db4e42e254a1e9cb
BLAKE2b-256 d9b4301999a8a8abc0442a2fb35468192f9152a65278be9c2c7828766d336bbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudnet_api_client-0.1.2.tar.gz:

Publisher: publish.yml on actris-cloudnet/cloudnet-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudnet_api_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudnet_api_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dcdc86754eaeb7dae2b38a119b41e76f3f5d16b7b0bb52a38e73f06e3b78e16d
MD5 56e53ac451e248e96b71ee4427b6be15
BLAKE2b-256 e0bb3b2646607a439a9d4db6daa2960ade2b81de0a877c1271abb50968d8a8a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudnet_api_client-0.1.2-py3-none-any.whl:

Publisher: publish.yml on actris-cloudnet/cloudnet-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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