Skip to main content

Client for EarthRanger API

Project description

EarthRanger Client

Introduction

EarthRanger is a software solution that aids protected area managers, ecologists, and wildlife biologists in making more informed operational decisions for wildlife conservation.

The er-client is a way, using python, to access the EarthRanger server HTTP API. In doing so, it hides the complexity of the ER resource based HTTP API. This client also provides the ability to multi-thread the calls to the API on your behalf, to return results to you faster.

Uses of er-client

  • Extracting data for analysis
  • Importing ecological or other historical data
  • Integrating a new field sensor type. If you do and will be supporting multiple ER sites, contact us to talk about our Gundi integrations platform
  • Performing external analysis that results in publishing an Alert on the ER platform.

Quick Start

see simple-example.py

Installation

pip install er-client

Then in your code, import the library and create an instance of the client.

from erclient import ERClient

client = ERClient(service_root="https://sandbox.pamdas.org/api/v1.0", username="", password="")

Development

Find er-client source here in github.

Create a new release

  1. increment version as appropriate in version.py
  2. install venv
python3.7 -m venv .venv
source .venv/bin/activate
  1. Optionally update requirements. Requirements are defined in setup.cfg, then we use pip-tools to create our pinned requirements.txt file.
pip-compile setup.cfg
  1. Use pre-commit to enforce our coding style Install pre-commit libraries and establish the git hooks.
    pip install pre-commit
    pre-commit install
    
    Manually run pre-commit
    pre-commit run --all-files
    
    Update pre-commit
    pre-commit autoupdate
    
    See the following for more information and a library of hooks: http://pre-commit.com/
  2. install wheel and upgrade pip libraries
pip install pip setuptools wheel build --upgrade
  1. build wheel
python -m build
  1. publish new wheel to project in github and pypi

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

earthranger-client-1.0.44.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

earthranger_client-1.0.44-py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 3

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