Python SDK for Cecil Earth
Project description
Cecil SDK
Table of Contents
Installation
pip install cecil
Authentication
Set CECIL_API_KEY environment variable to your Cecil API key.
Examples
Create an AOI and data request using the Cecil client
import cecil
client = cecil.Client()
my_aoi = client.create_aoi(
name="My AOI",
geometry={
"type": "Polygon",
"coordinates": [
[
[145.410408835, -42.004083838],
[145.410408835, -42.004203978],
[145.410623191, -42.004203978],
[145.410623191, -42.004083838],
[145.410408835, -42.004083838],
]
],
},
)
# Get dataset ID from docs.cecil.earth -> Datasets
planet_forest_carbon_diligence_id = "c2dd4f55-56f6-4d05-aae3-ba7c1dcd812f"
my_data_request = client.create_data_request(
aoi_id=my_aoi.id,
dataset_id=planet_forest_carbon_diligence_id,
)
print(client.get_data_request(my_data_request.id))
Create a transformation using the Cecil client
my_transformation = client.create_transformation(
data_request_id=my_data_request.id,
crs="EPSG:4326",
spatial_resolution=0.005,
)
print(client.get_transformation(my_transformation.id))
Query data (once transformation is completed)
df = client.query(f'''
SELECT *
FROM
planet.forest_carbon_diligence
WHERE
transformation_id = '{my_transformation.id}'
''')
Other client methods:
client.list_aois()
client.get_aoi(my_aoi.id)
client.list_data_requests()
client.get_data_request(my_data_request.id)
client.list_transformations()
client.get_transformation(my_transformation.id)
License
cecil is distributed under the terms of the MIT license.
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
cecil-0.0.22.tar.gz
(6.0 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 cecil-0.0.22.tar.gz.
File metadata
- Download URL: cecil-0.0.22.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60a7689ce83fa3b29d2addbdde9b3104edb14367dfd248358ce4c3d917ec5c9
|
|
| MD5 |
1a40209ea2b076e0a67a4dd82ba7ec63
|
|
| BLAKE2b-256 |
121de2132d907399498164947dd218d287ecbe3c1d4d07910744f539240d9c32
|
File details
Details for the file cecil-0.0.22-py3-none-any.whl.
File metadata
- Download URL: cecil-0.0.22-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d206a586b5a482a58a58e4fc3fff0f6fda221738000c7e74c7fbb6d9790ac7d
|
|
| MD5 |
3b182c8277fc4ebeab12086ca34f3eb9
|
|
| BLAKE2b-256 |
71cc87e32a28ed75ec5d46a02b9bd4554e1a92501e10f2c6908a4055c582fc80
|