Skip to main content

Python SDK for UP42

Project description


(BETA) Python package 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)

Install

The package requires Python > 3.6.

pip install up42-py

See the installation docs for all details and learn how to get started!


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.create_and_run_job()

30-seconds 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(porject_id=12345, project_api_key=12345)
project = up42.initialize_project()

workflow = project.create_workflow(name="30-seconds-workflow", use_existing=True)
# Add blocks/tasks to the workflow.
blocks = up42.get_blocks(basic=True)
input_tasks= [blocks['sobloo-s2-l1c-aoiclipped'], 
              blocks['sharpening']]
workflow.add_workflow_tasks(input_tasks=input_tasks)

# Define the aoi and input parameters of the workflow to run it.
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})

job = workflow.create_and_run_job(input_parameters=input_parameters)
job.track_status()

job.download_results()
job.map_results()

Support

For any kind of issues or help please contact us via Email support@up42.com or open a github issue.

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

up42-py-0.8.1b7.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

up42_py-0.8.1b7-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file up42-py-0.8.1b7.tar.gz.

File metadata

  • Download URL: up42-py-0.8.1b7.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for up42-py-0.8.1b7.tar.gz
Algorithm Hash digest
SHA256 17adbb0325fd08a4f11863a92d264dd92d6d28c28afc69a465ad56a796c504a4
MD5 af69c7b719aaa6bd124b040cd4f1ea3d
BLAKE2b-256 7d929ba0b349f79cf9908beb6408abaad3154a5793a62e9912593e660730d288

See more details on using hashes here.

File details

Details for the file up42_py-0.8.1b7-py3-none-any.whl.

File metadata

  • Download URL: up42_py-0.8.1b7-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for up42_py-0.8.1b7-py3-none-any.whl
Algorithm Hash digest
SHA256 2c147d34e891acdfe197e2d40b22a55671cbf45577f4a0dcc8faf0ea7f689c0b
MD5 d61b9e7a480a17d3f969644542d64727
BLAKE2b-256 b4160eb0ca5894c9240d030ffe23820f4ced449397b8e47eb4bf37ed80b09332

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page