Skip to main content

Arlula API Python Package

About

This package provides a core interface for interacting with the Arlula API. This package can be found on PyPI. Documentation for this package can be found below, but for extensive documentation see the wiki.

Prerequisites

This package requires an active Arlula account and access to the API credentials. If you don't have an account, you can create one at api.arlula.com/signup.

Installation

pip install arlulacore

Instantiation

Instantiate a Session object using your API credentials as below. This will validate your credentials and store them for the remainder of the session. This can be re-used for numerous requests or be instantiated numerous times with different API account credentials for concurrent access to different sessions.

import arlulacore

"""opening a session"""
arlula_session = arlulacore.Session(key, secret)

API Endpoints

This package contains methods for each of the supported API endpoints, namespaced by API namespace. Each namespace inherits the session defined above

Archive

The Archive API provides the ability to search and order from Arlula and its supplier's historic imagery archives.

api = arlulacore.ArlulaAPI(arlula_session)

archive = api.archiveAPI()

# Search for imagery around sydney between 2020-Jan-1 and 2020-Feb-1
# With at least 10m resolution (gsd)
search_result = archive.search(
    arlulacore.SearchRequest(
        start=date(2020, 1, 1), 
        gsd=10,
    )
    .set_point_of_interest(-33.8688, 151.2093)
    .set_end(date(2020, 2, 1))
)

# Order a specific image from the archive, using the id from above, 
# the eula that applies to you, the bundle you want, and (optionally) 
# email jane.doe@gmail.com and john.smith@gmail.com when it is complete.
order_result = archive.order(
    arlulacore.ArchiveOrderRequest(
        id="eyJhb...AYTqwM",
        eula="Supplier's EULA",
        bundle_key="default",
    )
    .set_emails(["john.smith@gmail.com", "jane.doe@gmail.com"])
)

Tasking

The Tasking API provides the ability to search and order future capturing opportunities from Arlula and it's suppliers.

tasking = api.taskingAPI()

# Search for capturing opportunities around sydney over the next 30 days
# With at least 1m resolution and at an off-nadir of less than 30 degrees.
search_result = tasking.search(
    arlulacore.TaskingSearchRequest(
        datetime.datetime.now(datetime.timezone.utc), 
        datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=30),
        1,
        30,
    )
    .set_point_of_interest(-33.8688, 151.2093)
)

# Order a future capture, using the ordering id from an above result, 
# the eula that applies to you, the bundle you want, and (optionally) 
# email jane.doe@gmail.com and john.smith@gmail.com when it is complete.
order_result = tasking.order(
    arlulacore.TaskingOrderRequest(
        id="eyJhb...AYTqwM",
        eula="Supplier's EULA",
        bundle_key="default",
        priority="priority",
        cloud=30,
    )
    .set_emails(["john.smith@gmail.com", "jane.doe@gmail.com"])
)

Orders

The Orders API provides the ability to list and get entities within Arlula's Orders system. These include Orders, Datasets, Campaigns, and Resources.

ordersAPI = api.ordersAPI()

# List all orders the authenticated API account has access to
orders = ordersAPI.list_orders()

# Get all campaigns delivered for an order
campaigns = ordersAPI.list_campaigns_for_order("cade11f4-8b4d-43e1-8cb1-3bce85111a01")

# Get all datasets delivered for an order
datasets = ordersAPI.list_datasets_for_order("cade11f4-8b4d-43e1-8cb1-3bce85111a01")

# Get the status and details of an order (will also populate datasets and campaigns)
order = ordersAPI.get_order("cade11f4-8b4d-43e1-8cb1-3bce85111a01")

# List all datasets the authenticated API account has access to
datasets = ordersAPI.list_datasets()

# Get a specific resource, for example thumbnails, tiffs, json metadata.
# Streams to a file and returns the file handle.
with ordersAPI.download_resource_as_file("b7adb198-3e6e-4217-9e67-fb26eb355cc4", filepath="downloads/thumbnail.jpg") as f:
    f.read()

# Get a specific resource, for example thumbnails, tiffs, json metadata.
# Returns the memory buffer of the requested resource.
# Not recommended for large files.
b = ordersAPI.download_resource_as_memory("b7adb198-3e6e-4217-9e67-fb26eb355cc4")

Metadata

Release files for arlulacore 4.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arlulacore 4.0.1
File Size Uploaded Provenance
arlulacore-4.0.1.tar.gz 35.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arlulacore 4.0.1
File Interpreter ABI Platform
arlulacore-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 69.1 kB

Release files / arlulacore-4.0.1.tar.gz

Download URL arlulacore-4.0.1.tar.gz
Size 35.2 kB
Tags Source
SHA-256 checksum
How to use checksums
39517fc5a8b7778198a85a67fd199116d74587886479716d9fa456361b90b119
BLAKE2b-256 checksum
How to use checksums
9ba6be2188646c71ba45b60fc3db65a30c7db641d7642f27eae084df222e38c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / arlulacore-4.0.1-py3-none-any.whl

Download URL arlulacore-4.0.1-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
132758fbb912ce94335fa4c231c009e17940e6bb8184ac113ce0e5760bea8679
BLAKE2b-256 checksum
How to use checksums
27a0b610fa783b377d243732726d7c5a8beef0b590d010aebf32d6b60c7a3af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.5

Security for arlulacore 4.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page