Skip to main content

AgroDigital Python SDK

PyPI version License: MIT

A modern, easy-to-use Python SDK for interacting with the agrodigital.io API. This library provides a high-level interface to manage agricultural entities, IoT data, meteorological stations, and satellite imagery analysis.

Features

  • Entity Management: CRUD operations for Farms, Fields, Polygons, and Crops.
  • Monitoring & Data: Specialized access to Raster imagery, indexes, and Google Earth Engine clusters.
  • IoT & Meteo: Seamless integration with IoT stations and meteorological data.
  • Operations Logs: Track sowing, applications, and logs.
  • Scouting: Manage bugs, weeds, and diseases via waypoints.
  • Object-Oriented: All API responses are converted into Python objects with dot-notation access.

Installation

You can install the SDK via pip:

pip install agrodigital_io

Or using poetry:

poetry add agrodigital_io

Quick Start

Authentication

To begin, initialize the AgroDigitalClient using either your API token or your username and password.

from agrodigital_io import AgroDigitalClient

# Option 1: Using an API Token
client = AgroDigitalClient(token="your_api_token_here")

# Option 2: Using Credentials
client = AgroDigitalClient(username="your_username", password="your_password")

Basic Operations

List all farms

farms = client.farms.list()
for farm in farms:
    print(f"Farm: {farm.name} (ID: {farm.id})")

Get field data

field = client.fields.retrieve(id=123)
print(f"Field name: {field.name}")
print(f"Associated crop: {field.crop.name}") # Nested objects supported

Fetch IoT Data

# Get data from a specific station between dates
data = client.iot_data.list_data(
    station_id=45, 
    from_date="2023-01-01", 
    to_date="2023-01-07",
    variables=["temperature", "humidity"]
)

Advanced Usage

Raster and Imagery

Access satellite imagery metadata and available dates for specific polygons.

dates = client.rasters.available_dates()
print(f"Available imagery dates: {dates}")

Cluster Retrieval

Fetch Google Earth Engine or local clusters for a specific polygon and date range.

clusters = client.cluster.ee_retrieve(
    from_date="2023-01-01",
    to_date="2023-12-31",
    polygon_id="poly_88",
    n_clusters=5
)

Error Handling

The SDK raises AgroDigitalError for API-related issues, including connection timeouts and non-200 status codes.

from agrodigital_io import AgroDigitalError

try:
    client.fields.retrieve(999999)
except AgroDigitalError as e:
    print(f"Error: {e.message}")
    print(f"Status Code: {e.status_code}")

Requirements

  • Python >= 3.10
  • requests library

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for agrodigital-io 0.1.2

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

Source distribution (sdist)

Source distribution for agrodigital-io 0.1.2
File Size Uploaded Provenance Actions
agrodigital_io-0.1.2.tar.gz 9.4 kB With provenance Details for agrodigital_io-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agrodigital-io 0.1.2
File Interpreter ABI Platform Actions
agrodigital_io-0.1.2-py3-none-any.whl Python 3 none any Details for agrodigital_io-0.1.2-py3-none-any.whl

Total release size: 19.8 kB

Release files / agrodigital_io-0.1.2.tar.gz

Download URL agrodigital_io-0.1.2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
83adc9dc41225d1491c7f71e052397f25286b3999d4ae8bd484e082f01dc4ee0
BLAKE2b-256 checksum
How to use checksums
10408827b7112b7c73f6a0c7c6837b001172edc8224aef00764e36cd556ee15e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 13, 2026.

Transparency log

Release files / agrodigital_io-0.1.2-py3-none-any.whl

Download URL agrodigital_io-0.1.2-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
115266a0075ea8437cac31863f0ded592ad3769d435fefb58e0b93b43df2c584
BLAKE2b-256 checksum
How to use checksums
3a686c0a27a71879130d8a914e47e1c04aeac5493f64ae3fe1615db2545d58c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 13, 2026.

Transparency log

Security for agrodigital-io 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agrodigital_io-0.1.2.tar.gz

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 Jan 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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