Skip to main content

SDK and CLI for pushing data to the AgNUE platform

Project description

agnue-push

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

Installation

pip install agnue-push

Configuration

When your site is approved, you receive an agnue.toml file by email. Place it in your working directory — the SDK picks it up automatically.

You can also configure via environment variables: AGNUE_PLATFORM_URL, AGNUE_API_TOKEN, and optionally AGNUE_S3_*.

CLI

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

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

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

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

Fallback behaviour: if the platform API is unreachable after 3 retries, files are uploaded directly to S3, if configured.

Python API

from agnue_push import AgNUEClient

client = AgNUEClient.from_config()  # reads agnue.toml or env vars

# Upload a file — returns ingestion_id, or None if staged locally
ingestion_id = client.upload("data.csv", data_source_id="DK-Foo-SOIL-01")

# Check an earlier S3 upload
exists = client.verify_upload("raw/DK-Foo/data.csv")

# List all uploads for this site
keys = client.list_uploads()

Pass explicit config instead of a file:

client = AgNUEClient.from_config(
    platform_url="https://api.example.com",
    api_token="st_tok-...",
)

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

agnue_push-0.1.4.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agnue_push-0.1.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file agnue_push-0.1.4.tar.gz.

File metadata

  • Download URL: agnue_push-0.1.4.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agnue_push-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b15d355c1cbbe7703208a17074d4de987f44e92e966e1827a4ad7a46e509b79b
MD5 e095fc0b9d2735eab36f90f224656ee5
BLAKE2b-256 4691bc0073d475fcd15c924960e9b0d6959b8d3871bad159f5ee257b6ea5b035

See more details on using hashes here.

Provenance

The following attestation bundles were made for agnue_push-0.1.4.tar.gz:

Publisher: publish-sdk.yml on teknologisk-institut/AgNUE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agnue_push-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: agnue_push-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agnue_push-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 020eb87fd7c6bd43d49a05a1c436a4621ce0c05f2c5715aebfb436a8eeaac72e
MD5 0d8386df7d4dbe73e17216a55a331427
BLAKE2b-256 700f9b435e8a5ebaf6736074eb2da276b5cda305dd07df1bd38d1ab161ed3c30

See more details on using hashes here.

Provenance

The following attestation bundles were made for agnue_push-0.1.4-py3-none-any.whl:

Publisher: publish-sdk.yml on teknologisk-institut/AgNUE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page