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) or staged locally under agnue-staging/raw/<site>/ for later pickup.

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-...",
)

License

See LICENSE.

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.3.tar.gz (7.7 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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agnue_push-0.1.3.tar.gz
  • Upload date:
  • Size: 7.7 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.3.tar.gz
Algorithm Hash digest
SHA256 fb292912239303c11567fc11311e5d721e50e5608e315bbf2f302a41d9a1407d
MD5 c43322659956d49158ee65dd92af89f9
BLAKE2b-256 e315f065ea73132828a43fee4a910bc6b8001b096193c6b5942e8dca7286c37c

See more details on using hashes here.

Provenance

The following attestation bundles were made for agnue_push-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: agnue_push-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c61d8eaf3bb75d7fe2ebf999c4b2c540cbbd0d961c9ba65462aeb4b7e4261d6
MD5 9f6b963b77b088f8dc51d2b7f5ebbb82
BLAKE2b-256 8996f2dced1b11a17a40b0eb557208d54ad9f5fe013432b6af70d579e425cbb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for agnue_push-0.1.3-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