Client package for the DDC API.
Project description
DDC Utility
This is the Danube Data Cube Utility library, for interacting with the DDC API service.
Installation
pip install ddc-utility
Usage
Users must have a valid DDC registration.
Example
This example walks you through the process of creating and opening an AOI cube.
$ python
# Importing packages
>>> import os
>>> from ddc_utility.client import DdcClient
# Setting DDC credentials
>>> os.environ['DDC_CLIENT_ID'] = "<client id>"
>>> os.environ['DDC_CLIENT_SECRET'] = "<client secret>"
# Initialize DDC client
>>> client = DdcClient()
# List available data layers
>>> client.get_data_layers()
# List user's AOIs
>>> client.get_all_aoi()
# Create an AOI
>>> res = client.create_aoi(name="My AOI",
geometry="POLYGON ((19.021454 47.507925, 19.043941 47.489601, 19.047031 47.490181, 19.039478 47.506997, 19.021454 47.507925))",
time_range=("2023-06-01", "2023-07-01"),
layer_ids=[4, 8, 15, 48])
>>> id = res.iloc[0]['id']
# Check if AOI is 'ready'
>>> info = client.get_aoi_by_id(id)
>>> print(f"AOI status is: {info.iloc[0]['status']}")
# If status is 'ready', open cube
>>> ds = client.open_aoi_cube(aoi_id=id)
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
ddc_utility-1.7.0.tar.gz
(13.1 kB
view details)
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 ddc_utility-1.7.0.tar.gz.
File metadata
- Download URL: ddc_utility-1.7.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98e58fe9dc049e3a6f3f00aad57b4b3c89145bce9533812f94be1385e443a281
|
|
| MD5 |
1efe767610e6c4e880360f2a0c1d6157
|
|
| BLAKE2b-256 |
f7ad605b1da557fb6a467e248f226ce78251690c57a4c6ba8620f972233b2ae2
|
File details
Details for the file ddc_utility-1.7.0-py3-none-any.whl.
File metadata
- Download URL: ddc_utility-1.7.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb79b05546a466e7b95f5d80fdd30bf353bbe651eb865bfaefc42a53299652e
|
|
| MD5 |
0539f4995de38ec9873fecc5d3bfc4f1
|
|
| BLAKE2b-256 |
0979dc5d81279528e296fe3a91a64700a15b58b8462cc1455e2abbfac22c7d7e
|