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.1.tar.gz
(14.7 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.1.tar.gz.
File metadata
- Download URL: ddc_utility-1.7.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2629f839dbee453b3ce040ddf0fd95c3b9c8c881d538ddeb7f221c2f13f39955
|
|
| MD5 |
6881af307d26e36233d84213cb8d4f50
|
|
| BLAKE2b-256 |
b0df6d2ba1890b92d25ffb5e9260f790dca5c3b9f61237c70d73d24e7de97717
|
File details
Details for the file ddc_utility-1.7.1-py3-none-any.whl.
File metadata
- Download URL: ddc_utility-1.7.1-py3-none-any.whl
- Upload date:
- Size: 15.2 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 |
240284271b143abb17524c195e1cd5bb736f17e41c960742104454bf1b9bfa43
|
|
| MD5 |
1cec79b8f57756beaf48f78a5e1d26c8
|
|
| BLAKE2b-256 |
3496c58ad17d579dcfc8780181cab6d3ea253658c5b7f06d73fb0cacbdf7e0c9
|