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.2.tar.gz
(15.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.2.tar.gz.
File metadata
- Download URL: ddc_utility-1.7.2.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18086cd91a49fc85de26e3ae91797ae21690663975367563e1477666c3b666a
|
|
| MD5 |
b74cdf8e0f96ea684fd7e47b339ab33a
|
|
| BLAKE2b-256 |
44641d27a29bf6c4741083b3bdebd6e1c30d4a3f8ed9ab2747d9a5022657511d
|
File details
Details for the file ddc_utility-1.7.2-py3-none-any.whl.
File metadata
- Download URL: ddc_utility-1.7.2-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ac71b96d0f7116793d4f5bc7387608435133acad4d41a866668674d6c739faa
|
|
| MD5 |
f1b940116cb672a77b12983e81893da3
|
|
| BLAKE2b-256 |
f89efc425bd25df19e05be07a54dffcc391a71a844521b68d9c266a663603653
|