Python SDK for UP42, the geospatial marketplace and developer platform.
Documentation • UP42.com • Support
Highlights
- Python package for easy access to UP42's geospatial datasets & processing workflows
- For geospatial analysis & product builders!
- Interactive maps & visualization, ideal with Jupyter notebooks
- Command Line Interface (CLI)
- Developer tools for UP42 custom blocks (coming soon)
Installation & Documentation
See the documentation for getting started guides, examples and the code reference.
The package requires Python > 3.6.
pip install up42-py
Overview
- The UP42 Python SDK uses six object classes, representing the hierarchical structure of UP42:
- Project > Workflow > Job > JobTask
- Catalog
- Tools
- Each object can spawn elements of one level below, e.g.
project = up42.initialize_project()workflow = Project().create_workflow()job = workflow.run_job()
30-second Example
After authentication with the UP42 project, a new workflow is created and filled with tasks (Sentinel-2 data, Image Sharpening). The area of interest and workflow parameters are defined. After running the job, the results are downloaded and visualized.
import up42
up42.authenticate(project_id="123", project_api_key="456")
project = up42.initialize_project()
workflow = project.create_workflow(name="30-seconds-workflow", use_existing=True)
# Add blocks/tasks to the workflow.
print(up42.get_blocks(basic=True))
input_tasks= ['sobloo-s2-l1c-aoiclipped', 'sharpening']
workflow.add_workflow_tasks(input_tasks=input_tasks)
# Define the aoi and input parameters of the workflow to run it.
aoi = workflow.get_example_aoi(as_dataframe=True)
#aoi = workflow.read_vector_file("data/aoi_berlin.geojson", as_dataframe=True)
input_parameters = workflow.construct_parameters(geometry=aoi,
geometry_operation="bbox",
start_date="2018-01-01",
end_date="2020-12-31",
limit=1)
input_parameters["sobloo-s2-l1c-aoiclipped:1"].update({"max_cloud_cover":60})
# Run a test job to query data availability and check the configuration.
test_job = workflow.test_job(input_parameters=input_parameters, track_status=True)
test_results = test_job.get_results_json()
print(test_results)
# Run the actual job.
job = workflow.run_job(input_parameters=input_parameters, track_status=True)
job.download_results()
job.plot_results()
Support
For any kind of issues or suggestions please contact us via Email support@up42.com or open a github issue.
Release files for up42-py 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| up42-py-0.9.1.tar.gz | 46.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| up42_py-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.3 kB
Release files / up42-py-0.9.1.tar.gz
| Download URL | up42-py-0.9.1.tar.gz |
|---|---|
| Size | 46.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e37f5ee95b3cfd283dff26a4e722f6423980753b6e88c76b2eb69224ef1beb7d
|
|
BLAKE2b-256 checksum How to use checksums |
8cbb2cf28723c34a7d10fc67f4be5e9e4479e12cf61b71595e6980ef7f163ee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / up42_py-0.9.1-py3-none-any.whl
| Download URL | up42_py-0.9.1-py3-none-any.whl |
|---|---|
| Size | 40.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6565df551256e97aa045893fc221f3510af7a3e9f8fbc84731d6650fb5a3d583
|
|
BLAKE2b-256 checksum How to use checksums |
a273ec69046b0a651993cb67b8b7ee978503b663484aa177e8b339eedc0685df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|