Python SDK for UP42
Project description
Python interface 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)
Package Overview
- The UP42 Python SDK uses six object classes, representing the hierarchical structure of the UP42 platform:
- Project > Workflow > Job > JobTask,
- Catalog and
- Tools.
- Each object (besides Catalog and Tools) provides the full functionality at that specific level and can spawn elements of one level below, e.g.
project = up42.initialize_project()workflow = Project().create_workflow()job = workflow.create_and_run_job()
- Usually a user starts by creating a project object and then spawns objects of a lower level.
- It is also possible to directly access a lower-level object, e.g. a job that was already run on UP42 can be used to initialize the corresponding object via
up42.initialize_job(job_id='123456789').
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("config.json")
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()
Installation & Getting Started
The package requires Python > 3.6.
- Install via pip:
pip install up42-py
-
Create a new project on UP42.
-
Create a
config.jsonfile and fill in the project credentials.
{
"project_id": "...",
"project_api_key": "..."
}
- Test it in Python! This will authenticate with the UP42 Server and get the project information.
import up42
up42.authenticate(cfg_file="config.json")
project = up42.initialize_project()
print(project)
Success! Continue with the Getting Started chapter in the documentation!
For a developer installation (in case you want to contribute to up42-py) see the developer readme.
Support
You can reach us via Email support@up42.com or open a github issue. We are happy to answer your questions or help with using UP42!
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
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 up42-py-0.8.1b3.tar.gz.
File metadata
- Download URL: up42-py-0.8.1b3.tar.gz
- Upload date:
- Size: 43.3 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.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b1e8b2187c49ef21a926ccf91d35a00ef170a50197b0e92fb5942b4ebdaac5
|
|
| MD5 |
2c6eb8f7f89229d06bc38f2a9d43ca87
|
|
| BLAKE2b-256 |
00441b7d3cefb9d83ad48f0b14f51d70c796815733a0e25210e0cc572aaeeabb
|
File details
Details for the file up42_py-0.8.1b3-py3-none-any.whl.
File metadata
- Download URL: up42_py-0.8.1b3-py3-none-any.whl
- Upload date:
- Size: 56.2 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.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72882683944c7ab055dc777c48456abbdf052d323c64cdcfb63a64f9f8983814
|
|
| MD5 |
3ef3321227437e1080a6450b12064b75
|
|
| BLAKE2b-256 |
cb84a3238e66a75a814a333b4d68538f1bd5e4df395b1fe395309aa1ea531ba0
|