Skip to content
Python client library for Esper APIs
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
esperclient
test
.gitignore
.swagger-codegen-ignore
.travis.yml
README.md
requirements.txt
setup.py
test-requirements.txt
tox.ini

README.md

Esper SDK for Python

Build Status Gitter

Esper provides a Python client library to communicate with the Esper APIs to programmatically control and monitor your enterprise's Android-based Dedicated Devices using Esper Manage. To read more about the various capabilities of Esper Manage and Esper managed devices, please visit esper.io.

  • API version: 1.0.0
  • Package version: 0.0.11

Requirements.

Python 3.4+

Additionally, you need a dedicated Esper environment set up on Esper Cloud through our Esper Dev Trial. For more details checkout Esper Requirements

Installation

Using pip install

From PyPI

pip install esperclient

or

From Github

pip install git+https://github.com/esper-io/esper-client-py.git

From source

Download/Clone the project and install via Setuptools.

git clone https://github.com/esper-io/esper-client-py.git

cd esper-client-py

python setup.py install

You need not install setuptools separately, they are packaged along with downloaded library

Getting Started

Please follow the installation procedure stated above and then run the following:

import esperclient
from esperclient.rest import ApiException

# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = esperclient.DeviceApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | ID of the enterprise

try:
    # Fetch all devices in an enterprise
    api_response = api_instance.get_all_devices(enterprise_id)
    print(api_response)
except ApiException as e:
    print("Exception when calling DeviceApi->get_all_devices: %s\n" % e)

Documentation for API Endpoints

Given below is a detailed documentation for each of the API endpoint along with supported request options. All URIs are relative to https://foo-api.esper.cloud/api

Class Method HTTP request
ApplicationApi delete_app_version DELETE /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/
ApplicationApi delete_application DELETE /enterprise/{enterprise_id}/application/{application_id}/
ApplicationApi get_all_applications GET /enterprise/{enterprise_id}/application/
ApplicationApi get_app_version GET /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/
ApplicationApi get_app_versions GET /enterprise/{enterprise_id}/application/{application_id}/version/
ApplicationApi get_application GET /enterprise/{enterprise_id}/application/{application_id}/
ApplicationApi upload POST /enterprise/{enterprise_id}/application/upload/
CommandsApi get_command GET /enterprise/{enterprise_id}/device/{device_id}/command/{command_id}/
CommandsApi run_command POST /enterprise/{enterprise_id}/device/{device_id}/command/
DeviceApi get_all_devices GET /enterprise/{enterprise_id}/device/
DeviceApi get_app_installs GET /enterprise/{enterprise_id}/device/{device_id}/install/
DeviceApi get_device_app_by_id GET /enterprise/{enterprise_id}/device/{device_id}/app/{app_id}/
DeviceApi get_device_apps GET /enterprise/{enterprise_id}/device/{device_id}/app/
DeviceApi get_device_by_id GET /enterprise/{enterprise_id}/device/{device_id}/
DeviceApi get_device_event GET /enterprise/{enterprise_id}/device/{device_id}/status/
DeviceGroupApi create_group POST /enterprise/{enterprise_id}/devicegroup/
DeviceGroupApi delete_group DELETE /enterprise/{enterprise_id}/devicegroup/{group_id}/
DeviceGroupApi get_all_groups GET /enterprise/{enterprise_id}/devicegroup/
DeviceGroupApi get_group_by_id GET /enterprise/{enterprise_id}/devicegroup/{group_id}/
DeviceGroupApi partial_update_group PATCH /enterprise/{enterprise_id}/devicegroup/{group_id}/
DeviceGroupApi update_group PUT /enterprise/{enterprise_id}/devicegroup/{group_id}/
EnterpriseApi get_enterprise GET /v1/enterprise/{enterprise_id}/
EnterpriseApi partial_update_enterprise PATCH /v1/enterprise/{enterprise_id}/
GroupCommandsApi get_group_command GET /enterprise/{enterprise_id}/devicegroup/{group_id}/command/{command_id}/
GroupCommandsApi run_group_command POST /enterprise/{enterprise_id}/devicegroup/{group_id}/command/
TokenApi get_token_info GET /v1/token-info/

Documentation For Models

Documentation For Enums

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

developer@esper.io

License

Copyright 2019 Shoonya Enterprises Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.