A package to facilitate access to the Arlula Imagery Marketplace API
Project description
Arlula API Python Package
About
This package provides a core interface for interacting with the Arlula API. This package can be found on PyPI.
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
Initiation
Instantiate a Session object using your API credentials as below. This will validate your credentials and store them for the remainder of the session.
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
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
search_result = archive.search(
arlulacore.SearchRequest(
start=date(2020, 1, 1),
res=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, and (optionally)
# email jane.doe@gmail.com and john.smith@gmail.com when it is complete.
order_result = archive.order(
arlulacore.OrderRequest(
id="cade11f4-8b4d-43e1-8cb1-3bce85111a01",
eula="Supplier's EULA",
seats=1,
)
.set_emails(["john.smith@gmail.com", "jane.doe@gmail.com"])
)
Orders
orders = api.ordersAPI()
# Get the status and details of an order
order = orders.get(
id="cade11f4-8b4d-43e1-8cb1-3bce85111a01",
)
# Get a specific resource, for example thumbnails, tiffs, json metadata.
# Streams to a file and returns the file handle.
f = orders.get_resource_as_file(
id="b7adb198-3e6e-4217-9e67-fb26eb355cc4",
filepath="downloads/thumbnail.jpg",
)
# Get a specific resource, for example thumbnails, tiffs, json metadata.
# Returns the memory buffer of the requested resource.
# Not recommended for large files.
b = orders.get_resource_as_memory(
id="b7adb198-3e6e-4217-9e67-fb26eb355cc4",
)
# List the details and status of all orders made
order_list = orders.list_orders()
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
File details
Details for the file arlulacore-2.0.1.tar.gz
.
File metadata
- Download URL: arlulacore-2.0.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01941434fce365758caa2ceaf51503226380704367cf966647bd27980aff8e51 |
|
MD5 | 1f4bb51ae29fd6f7a7098dc6c4b7c555 |
|
BLAKE2b-256 | 6da505ab872435bec1d9e95132d0878996a84fc1e3a2b3dd12a94accdbe3bf00 |
File details
Details for the file arlulacore-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: arlulacore-2.0.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9855cc0c23016b72ec6f13993d2d48892379dc9059d20d800f3ef88e61bb6e9 |
|
MD5 | 35df0360ed56bdb76b7126a46fcf5787 |
|
BLAKE2b-256 | e4f589e22240e49c24d4895a9d9d2353040dcb42b745777e9297022ea3c84601 |