Skip to main content

A Python EMS RESTful API Client/Wrapper

Project description

Python Client Library for the EMS API

This project is a client library for the EMS API that is generated using AutoRest. It is intended to be a direct mirror of the routes and models exposed by the EMS API. This makes the package suitable for purpose-built projects that want to use the low-level API routes directly with minimal effort.

For data science and exploratory use, consider using the emsPy package instead.

Getting Started

Install via pip

pip install emsapi

Create an API client

In your code, create an API client object using an endpoint, username, and password:

from emsapi import emsapi

user = "..."
password = "..."
url = "https://ems.efoqa.com/api/"

client = emsapi.create(user, password, url)

Retrieve EMS system id

If the EMS system id is not known, it should be retrieved before any further requests:

ems_id = client.find_ems_system_id('ems7-app')

Access routes on the API client

Different routes are exposed as members of the client object created in the previous step. These routes match the sections in the API Explorer documentation in the web UI. Most of them need the ems system id (see previous step).

# The routes exposed by the client:
client.analytic
client.analytic_set
client.asset
client.database
client.ems_profile
client.ems_system
client.navigation
client.parameter_set
client.profile
client.tableau
client.trajectory
client.transfer
client.upload
client.weather

Examples:

# List the root analytic group contents
groups = client.analytic.get_analytic_group_contents(ems_id)

# Query a specific analytic
flight = 123
altitude_id = "H4sIAAAAAAAEAG2Q0QuCMBDG34P+B/HdbZVUiApBPQT2kgi9rrn0YM7aZvbnN5JVUvdwfHD34/vu4iPXrbjTs+D7kksDF+DKezRC6ggSvzbmGmHc9z3qF6hVFZ4TMsOnQ5azmjc0AKkNlYz7A/Mm9GusUUkNZa00ijLj+BCTFd6UgApF/XQ68bx4SMHVvkyd1GjX6KytgFER46+FEZBfObOZ2db6eBBJEIlvVGfz4P+LhYRbZ29NyVCzgJD1MgitDIhrrj6+P/h04obj36VPLpuOeVIBAAA="

# Pull out altitude with 100 samples through the file.
query = {
    "select": [
        {
            "analyticId": altitudeId
        }
    ],
    "size": 100
}

altitude = client.analytic.get_query_results(ems_id, flight, query)

Project details


Download files

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

Source Distribution

emsapi-0.0.1.tar.gz (71.3 kB view details)

Uploaded Source

Built Distribution

emsapi-0.0.1-py3-none-any.whl (233.9 kB view details)

Uploaded Python 3

File details

Details for the file emsapi-0.0.1.tar.gz.

File metadata

  • Download URL: emsapi-0.0.1.tar.gz
  • Upload date:
  • Size: 71.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for emsapi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 31c1dd99e802298a2bf545051312c0d95cc962e05eca2f2a2d04d3b01d3e5623
MD5 c9f69f6a1d4fc762859c70c28876ee83
BLAKE2b-256 e0b9be1d539ac4f14f47c28865eaebd864bcbdaf3e62e536a8aca5af689c9e89

See more details on using hashes here.

File details

Details for the file emsapi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: emsapi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 233.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for emsapi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 101275914861dcbd480c3b6c80df34feeed0fd86a3c6733fb479f9dfe82d07f0
MD5 5f86f141cd95c560b78b5e55e3bb83fb
BLAKE2b-256 781c4c5c401a8d295abb4c735445b15eed771995c16eff6313fcb006740dac3a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page