Skip to content

🗃️ Structure

Hierarchy

  • The Python SDK uses nine classes, representing the hierarchical structure of UP42:
    • Project > Workflow > Job > JobTask
    • JobCollection
    • Catalog > Order
    • Storage > Asset
  • Each class object can spawn elements of one level below, e.g.
    • project = up42.initialize_project()
    • workflow = project.create_workflow()
    • job = workflow.run_job()

Functionality

A quick overview how the different class objects are created, used and which functionality they offer. If a workflow etc. already exists on UP42, you can also initialize and access it directly using its id.

Available Functionality

up42 is the base library module imported to Python. It provides the elementary functionality that is not bound to a specific class of the UP42 structure (Project > Workflow > Job etc.). From up42 you can initialize other existing objects, get information about UP42 data & processing blocks, read or draw vector data, and adjust the SDK settings.

To import the UP42 library:

import up42


Available functions, see also up42 reference:

  • .authenticate()
  • .draw_aoi()
  • .get_block_details()
  • .get_blocks()
  • .get_example_aoi()
  • .get_logger()
  • .initialize_asset()
  • .initialize_catalog()
  • .initialize_job()
  • .initialize_jobcollection()
  • .initialize_jobtask()
  • .initialize_order()
  • .initialize_project()
  • .initialize_storage()
  • .initialize_workflow()
  • .read_vector_file()
  • .settings()
  • .validate_manifest()

The Project is the top-level class of the UP42 hierarchy. With it you can create new workflows, query already existing workflows & jobs in the project and manage the project settings.

Create a new project on the UP42 Console website.

Use an existing project:

up42.authenticate(project_id="uz92-8uo0-4dc9-ab1d-06d7ec1a5321",
                  project_api_key="9i7uec8a-45be-41ad-a50f-98bewb528b10")
project = up42.initialize_project()


Available functions, see also Project reference:

  • .create_workflow()
  • .get_jobs()
  • .get_project_settings()
  • .get_workflows()
  • .update_project_settings()
  • .info()
  • .max_concurrent_jobs()

The Workflow class lets you configure & run jobs and query existing jobs related to this workflow.

Create a new workflow:

workflow = project.create_workflow(name="new_workflow")

Use an existing workflow:

workflow = up42.initialize_workflow(workflow_id="7fb2ec8a-45be-41ad-a50f-98ba6b528b98")


Available functions, see also Workflow reference:

  • .add_workflow_tasks()
  • .construct_parameters()
  • .construct_parameters_parallel()
  • .delete()
  • .estimate_job()
  • .get_compatible_blocks()
  • .get_jobs()
  • .get_parameters_info()
  • .get_workflow_tasks()
  • .run_job()
  • .run_jobs_parallel()
  • .test_job()
  • .test_jobs_parallel()
  • .update_name()
  • .info()
  • .workflow_tasks()
  • .max_concurrent_jobs()

The Job class is the result of running a workflow. It lets you download, visualize and manipulate the results of the job, and keep track of the status or cancel a job while still running.

Run a new job:

job = workflow.run_job(name="new_job", input_parameters={...})

Use an existing job:

job = up42.initialize_job(job_id="de5806aa-5ef1-4dc9-ab1d-06d7ec1a5021")


Available functions, see also Job reference:

  • .cancel_job()
  • .download_quicklooks()
  • .download_results()
  • .get_jobtasks()
  • .get_jobtasks_results_json()
  • .get_logs()
  • .get_results_json()
  • .map_quicklooks()
  • .map_results()
  • .plot_coverage()
  • .plot_quicklooks()
  • .plot_results()
  • .track_status()
  • .upload_results_to_bucket()
  • .info()
  • .status()
  • .is_succeeded()

The JobTask class provides access to the result of a specific block in the workflow. Each job contains one or multiple JobTasks, one for each block.

Use an existing jobtask:

jobtask = up42.initialize_jobtask(jobtask_id="3f772637-09aa-4164-bded-692fcd746d20",
                                  job_id="de5806aa-5ef1-4dc9-ab1d-06d7ec1a5021")


Available functions, see also JobTask reference:

  • .download_quicklooks()
  • .download_results()
  • .get_results_json()
  • .map_results()
  • .plot_quicklooks()
  • .plot_results()
  • .info()

The JobCollection class provides facilities for handling and downloading multiple jobs results as one object.

A jobcollection is created as the result of e.g. running multiple jobs in parallel:

jobcollection = workflow.run_jobs_parallel()

Initialize a jobcollection from existing jobs:

jobcollection = up42.initialize_jobcollection(job_ids=["12345", "6789"])


Available functions, see also JobCollection reference:

  • .apply()
  • .download_results()
  • .map_results()
  • .plot_results()
  • .info()
  • .status()

The Catalog class enables access to the UP42 catalog search. You can search for satellite image scenes (for different sensors and criteria like cloud cover), plot the scene coverage and download and plot the scene quicklooks.

Use the catalog:

catalog = up42.initialize_catalog()


Available functions, see also Catalog reference:

  • .construct_parameters()
  • .download_quicklooks()
  • .estimate_order()
  • .map_quicklooks()
  • .place_order()
  • .plot_coverage()
  • .plot_quicklooks()
  • .search()

The Storage class enables access to the UP42 storage. You can list your assets and orders within an UP42 workspace.

Use the storage:

storage = up42.initialize_storage()


Available functions, see also Storage reference:

  • .get_assets()
  • .get_orders()

The Order class enables you to place, inspect and get information on orders.

Use an existing order:

order = up42.initialize_order(order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44")


Available functions, see also Order reference:

  • .estimate()
  • .get_assets()
  • .place()
  • .track_status()
  • .info()
  • .status()
  • .is_fulfilled()
  • .metadata()

The Asset class enables access to the UP42 assets in the storage. Assets are results of orders or results of jobs with download blocks.

Use an existing asset:

asset = up42.initialize_asset(asset_id="8c2dfb4d-bd35-435f-8667-48aea0dce2da")


Available functions, see also Asset reference:

  • .download()
  • .info()
  • .source()


Success!

Continue with the Catalog Search chapter!