Skip to main content

EarthRanger Client

Introduction

EarthRanger is a software solution that helps protected area managers, ecologists, and wildlife biologists make informed operational decisions for wildlife conservation.

The earthranger-client (er-client) is a Python library for accessing the EarthRanger HTTP API. It simplifies interaction with the API by abstracting away the complexity of resource-based endpoints and provides multi-threaded and async capabilities for improved performance.

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

From pypi

pip install earthranger-client

Usage

In your code, import the library and create an instance of the client. You must provide client_id (e.g. example_client_id) for username/password authentication.

from erclient import ERClient

client = ERClient(service_root="https://sandbox.pamdas.org", client_id="example_client_id", username="", password="")

Async Support

We also offer an async client (asyncio).

Disclaimer: The async client current capabilities are limited to:

  • Posting Sensor Observations (a.k.a Positions)
  • Posting Events (a.k.a Reports)
  • Posting Event Attachments
  • Posting Camera Trap Reports
  • Getting Event Types
  • Getting Events
  • Getting Observations
  • Getting Subject Groups
  • Getting Feature groups
  • Getting Sources
  • Getting Source Assignments (aka SubjectSource resources)
  • Deleting Subjects
  • Deleting Sources
from erclient import AsyncERClient

# You can use it as an async context-managed client
async with AsyncERClient(service_root="https://sandbox.pamdas.org", client_id="example_client_id", username="", password="") as client:
   await self.er_client.post_sensor_observation(position)
   await client.post_report(report)
   await self.er_client.post_camera_trap_report(camera_trap_payload, file)
   ...
   
async with AsyncERClient(service_root="https://sandbox.pamdas.org", client_id="example_client_id", username="", password="") as client:
   async for observation in client.get_observations(start="2023-11-10T00:00:00-06:00"):
      print(observation)
      ...

# Or create an instance and close the client explicitly later
client = AsyncERClient(service_root="https://sandbox.pamdas.org", client_id="example_client_id", username="", password="")
await self.er_client.post_sensor_observation(position)
await client.post_report(report)
await self.er_client.post_camera_trap_report(camera_trap_payload, file)
...
await client.close()  # Close the session used to send requests to ER API

Release files for earthranger-client 1.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for earthranger-client 1.16.0
File Size Uploaded
earthranger_client-1.16.0.tar.gz 322.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for earthranger-client 1.16.0
File Interpreter ABI Platform
earthranger_client-1.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 350.3 kB

Release files / earthranger_client-1.16.0.tar.gz

Download URL earthranger_client-1.16.0.tar.gz
Size 322.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bc36be3e849c9f4876a84d61fe054a68a69a93e3bf3dc12870b1f4436ff18e77
BLAKE2b-256 checksum
How to use checksums
b640de9af422f198511671a3c0dc9b1172d2fa2fe50482d803f4d56bd09b51ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.

Transparency log

Release files / earthranger_client-1.16.0-py3-none-any.whl

Download URL earthranger_client-1.16.0-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51110cd8a241a4b3872902b84364eec9b3415d3c37a893dd1caa7bff35692ba7
BLAKE2b-256 checksum
How to use checksums
196fa22f99d6feccd4a30771287cccb6a0b6e1cc7b830530f95010f51744c339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2026.

Transparency log

Release history Release notifications | RSS feed

1.17.0

2 release files

This release

1.16.0 This release

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.6.0

2 release files

1.5.2

1 release file

1.5.1

2 release files

1.5.0

2 release files

1.0.49

2 release files

1.0.44

2 release files

1.0.43

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page