Skip to main content

agnue-push

CLI and Python SDK for uploading sensor data to the AgNUE platform.

Step-by-step guide (install, configure, first upload, scheduling with cron or Windows Task Scheduler, troubleshooting): Automatic uploads with agnue-push.

Installation

pip install agnue-push

Configuration

When your site is approved, you receive an agnue.toml file by email. Place it in the directory you run agnue from — the SDK reads ./agnue.toml.

You can also configure via environment variables: AGNUE_PLATFORM_URL, AGNUE_CLIENT_ID, AGNUE_CLIENT_SECRET, and optionally AGNUE_KEYCLOAK_URL (defaults to <platform origin>/realms/agnue) and AGNUE_S3_*. Precedence: CLI flags / explicit args > env vars > agnue.toml.

CLI

# Upload a single file
agnue upload data.csv --data-source DK-Foo-SOIL-001

# Upload a directory
agnue upload ./sensor-exports/ --data-source DK-Foo-SOIL-001

# Upload with glob, excluding backups
agnue upload "*.csv" --data-source DK-Foo-SOIL-001 --exclude "*_backup*"

The --data-source ID follows the format CC-SSS-DOMAIN-SEQ (e.g. DK-Foo-SOIL-001).

Compression: text files (.csv, .txt, .dat, .tsv, .json) are gzip-compressed before upload; the platform keeps the original content. Pass --no-compress (or upload(..., compress=False)) to send files as-is.

Fallback behaviour: if the platform API is unreachable after 3 attempts, files are uploaded directly to S3 only if the resolved S3 settings are complete (from the [s3] block, AGNUE_S3_* env vars or --s3-* flags), otherwise copied to a local agnue-staging/ folder. In both cases upload() returns None.

Python API

from agnue_push import AgNUEClient

client = AgNUEClient.from_config()  # reads ./agnue.toml or env vars
# client = AgNUEClient.from_config("/path/to/agnue.toml")

# Upload a file — returns ingestion_id, or None after the direct-S3 or local-staging fallback
ingestion_id = client.upload("data.csv", data_source_id="DK-Foo-SOIL-001")

# Re-uploading the same file is safe: the platform recognises it and returns the original ingestion_id

Pass explicit config instead of a file:

client = AgNUEClient.from_config(
    platform_url="https://nuedata.eu",
    client_id="site-DK-Foo",
    client_secret="...",
)

Changelog

0.4.0

Breaking

  • Removed Parquet conversion and the convert argument of upload(). It guessed each file's layout and could change values (headerless files lost their first row, some files failed to upload). Files are now sent exactly as they are. --no-convert and pip install 'agnue-push[convert]' still work but do nothing.
  • Requires a platform that accepts compressed uploads (rolled out before this release).

Added

  • Text files (.csv, .txt, .dat, .tsv, .json) are gzip-compressed before upload, typically 4–25× smaller. The platform stores the original content. Turn it off with --no-compress or upload(..., compress=False).

0.3.0

Breaking

  • Removed AgNUEClient.verify_upload() and AgNUEClient.list_uploads(). They could only see files sent through the direct-S3 fallback, not files sent through the platform. To check whether a file arrived, upload it again: the platform recognises it and returns the original ingestion ID.

Metadata

Release files for agnue-push 0.4.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 agnue-push 0.4.0
File Size Uploaded Provenance
agnue_push-0.4.0.tar.gz 30.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agnue-push 0.4.0
File Interpreter ABI Platform
agnue_push-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.6 kB

Release files / agnue_push-0.4.0.tar.gz

Download URL agnue_push-0.4.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6c3b0ac4ee8f3d2c334ff8e95d14cc5e3293ace20dfb59709c04e40331634b66
BLAKE2b-256 checksum
How to use checksums
549eb615b963e2f7eaaeb22cf785dd39945e86dc3694834d555d16659aff2943
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 8, 2026.

Transparency log

Release files / agnue_push-0.4.0-py3-none-any.whl

Download URL agnue_push-0.4.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8f3892c77836f0256cbc0be2109c30c7966725b0956f8a0de3a18f8e2c320ff
BLAKE2b-256 checksum
How to use checksums
abc53a521e76a31fd548344381d077c7fc5b5a6340efaa9b768bfda486176743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 8, 2026.

Transparency log

Security for agnue-push 0.4.0

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 agnue_push-0.4.0.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 8, 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.

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