Skip to main content

Cropwise API Client for Python

A Python client library wrapper for the Cropwise Operations (Cropio) API v3 featuring automated pagination, request retries, and optional spatial GIS data processing capabilities.

⚠️ Development Status: Beta
This library is currently in its Beta stage. It is fully functional for the implemented endpoints, but the codebase is actively growing. New Cropwise API endpoints will be added in future releases, and minor breaking changes to the interface may occur as the architecture matures.

✨ Supported API Endpoints & Features

This library provides direct access to specific Cropwise Operations API v3 endpoints, returning data structured as pandas DataFrames:

  • Core Infrastructure Directories:
    • fields
    • machines & machine_groups
    • implements
    • crops & work_types
    • users
    • agro_operations
    • machine_tasks
    • machine_task_agro_operation_mapping_items (links between machine tasks and agrooperations)
    • machine_task_field_mapping_items (links between machine tasks and fields)
    • gps_logger_data_items (raw spatial GPS tracking points)
    • gps_logger_event_data_items (machinery sensor telemetry logs, such as fuel levels or engine speeds)
    • history_items
    • inventory_history_items (audit history and version logs for core assets: Machines, Implements, Fields)

GIS Export Extension

  • Includes an optional processing module utilizing geopandas and shapely to compile multi-day or single-shift telemetry points into continuous LineString vector geometries saved directly into standard GeoPackage (.gpkg) layers.

📦 Installation

To install the core lightweight client for handling structured metadata tables only:

pip install cropwise-api-client

To install the complete geospatial version containing the processing module: (Note: Windows users are highly recommended to run this package inside an OSGeo4W Shell or the integrated QGIS Python Environment to prevent spatial binary environment errors).

pip install cropwise-api-client[gis]

🚀 Quick Start

Generate a permanent token inside your Cropwise Operations profile settings and use it for secure script initialization without exposing raw password strings in the codebase:

from cropwise import CropwiseClient

# Initialize the client using a secure permanent user API token
client = CropwiseClient(token="your_token")

# Fetch all operational fields into a structured pandas DataFrame indexed by ID
df_fields = client.get_fields()
print(df_fields[['id', 'name']])

2. Exporting Machinery Track to GeoPackage (.gpkg) for QGIS

Seamlessly download raw GPS tracking logs crossing multiple calendar days or overnight work shifts and compile them into a singular vector LineString layer saved straight to disk:

from datetime import datetime
from pathlib import Path
from cropwise import CropwiseClient
from cropwise.processing import build_machine_track_gpkg

client = CropwiseClient(token="your_token")

# Extract telemetry points and write a vector LineString file for GIS mapping
build_machine_track_gpkg(
    client=client,
    machine_id=1299,
    dt_from=datetime(2026, 10, 20, 20, 0, 0),  # Night shift start
    dt_to=datetime(2026, 10, 21, 8, 0, 0),    # Night shift end
    output_gpkg=Path("C:/GIS_Data/tracks/night_shift_1299.gpkg"),
    machine_name="John Deere 8R"
)

3. Extracting Dynamic Telemetry and Sensor Logs

Extract specific telemetry sensor attributes across multiple machinery assets at once. The library will automatically flatten dynamic nested data attributes into native tabular columns:

from cropwise import CropwiseClient

client = CropwiseClient(token="your_token")

# Fetch precise fuel level and engine speed logs
df_telemetry = client.get_logger_event_data(
    date_at="2026-10-23",
    machine_ids=[101],
    params=["fuel_level", "engine_speed", "pwr_ext"]
)
print(df_telemetry.head())

📄 License

This library is distributed under the MIT License. See LICENSE for more details.

Metadata

Release files for cropwise-api-client 0.1.6

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

Source distribution (sdist)

Source distribution for cropwise-api-client 0.1.6
File Size Uploaded Provenance
cropwise_api_client-0.1.6.tar.gz 13.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cropwise-api-client 0.1.6
File Interpreter ABI Platform
cropwise_api_client-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / cropwise_api_client-0.1.6.tar.gz

Download URL cropwise_api_client-0.1.6.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56429e4ee4cc7e213d7fa027494bae81116b6edbacc530ff69643e517e972112
BLAKE2b-256 checksum
How to use checksums
763335680a3a5b294310fed206f7bd59dbec7b93ec2a5c835a27e235c9516c08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / cropwise_api_client-0.1.6-py3-none-any.whl

Download URL cropwise_api_client-0.1.6-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36250a21b9fe215e39292e4a5b423b48f1496767d958b8efa0958079400dd553
BLAKE2b-256 checksum
How to use checksums
556d4229c2a1cd136659d87d35997951daac3371acee8ba86fa3c6e51eb2124c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for cropwise-api-client 0.1.6

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cropwise_api_client-0.1.6.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 Oct 23, 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.6 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