Skip to main content

A package to facilitate access to the Arlula Imagery Marketplace API

Project description

Arlula API Python Package

Installation

pip install arlulaapi

Initiation

Instantiate an ArlulaSession object using your API credentials as below. This will validate your credentials and store them for the remainder of the session.

import arlulaapi
arlula_session = arlulaapi.ArlulaSession(key, secret)

API Endpoints

This package contains methods for each of the supported API endpoints. Each method returns an object as prescribed in the API documentation. An example of each method is below:

search_result = arlula_session.search(
    start="2014-01-01",
    res="vlow",
    lat=40.84,
    long=60.15
)

order = arlula_session.order(
    id=orderId,
    eula="",
    seats=1,
    webhooks=[...],
    emails=[...]
)

## Downloads the resource to the specified filepath
# Optional suppress parameter controls console output
arlula_session.get_resource(
    id=resourceId,
    filepath="downloads/thumbnail.jpg",
    # optional
    suppress="false"
)

order = arlula_session.get_order(
    id="orderId"
)

orders = arlula_session.list_orders()

Other methods (experimental)

As well as supporting all of the Arlula API endpoints, this package provides other mechanisms of utilising the API.

Group search

The ArlulaSession gsearch method allows you to perform multiple searches at once, and have the results collated into a large search result object. To use the group search method, pass a list of GroupSearch objects, as below. The parameters for each search must pass the same requirements as the search method.

group_search = [
    {
        "start":"2014-01-01",
        "res":"vlow",
        "lat":40.84,
        "long":60.15
    },
    {
        "start":"2014-01-01",
        "end":"2014-02-01",
        "res":"vlow",
        "lat":30,
        "long":30   
    },
    {
        "start":"2015-01-03",
        "end":"2015-03-03",
        "res":"vlow",
        "lat":-30,
        "long":-30
    }
]
search_result=arlula_session.gsearch(group_search)

Order download

The Arlula API also provides the option to download an entire order's resources into a specified folder, as below. You may also pass an optional suppress parameter to remove all console output.

arlula_session.get_order_resources(
    id=orderId,
    folder="downloads/ordersample",
    suppress=True
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for arlulaapi, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size arlulaapi-1.0.3-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size arlulaapi-1.0.3.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page