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, or pass --config PATH.
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*"
# Several patterns; a leading ! excludes (single-quote it in bash)
agnue upload "*.csv" "*.txt" '!*.locked' --data-source DK-Foo-SOIL-001
# Scheduled runs: send everything, delete what arrived, retry the rest next run
agnue upload "*.dat" '!*.locked' --data-source DK-Foo-SOIL-001 --delete-after-upload
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.
Deleting after upload: pass --delete-after-upload (or upload(..., delete_after_upload=True)) to delete each local file once the platform or S3 confirms it has it. A file that changed after it was read or can't be deleted is kept and reported, but a write landing in the instant before deletion is lost, so leave out the file the logger is still writing to ('!*.locked', or have the logger start a new file e.g. every 30 minutes and exclude the current one); a file only queued locally in agnue-staging/ is kept too. Run the same command again later and those are sent (or recognised) and deleted then.
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.
Registering data sources (for AI agents)
agnue sources registers data sources from JSON spec files, with the site client in agnue.toml. It is built for coding agents; agnue skill install installs the instructions into .claude/skills/agnue-cli/ for Claude Code and into .agents/skills/agnue-cli/ (the open Agent Skills standard, read by GitHub Copilot, OpenCode, Kilo and others) — in your user profile by default, or in the current folder with --project. Running it again overwrites; agnue skill prints the instructions instead of installing.
agnue sources list # this site's sources and status
agnue sources template --data-type LAB_ANALYSIS > specs/nitrate.json
agnue sources validate specs/*.json # server dry run, nothing saved
agnue sources register specs/*.json # writes the assigned ID into each spec
agnue domains | badm-variables nitrate | locations | credentials list
agnue api GET api/v1/data-sources/domains # any endpoint, authenticated
Output is JSON. A failed spec doesn't stop the rest; the exit code is 1 if any failed. Registration stops at DRAFT: an operator approves the schema. These commands are never loaded by agnue upload.
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.6.0
Added
agnue skillgains actions:print(the default — prints the instructions, asagnue skillalways did) andinstall [--agent AGENT] [--project], which writes them to the skills directories coding agents discover:.claude/skills/agnue-cli/for Claude Code and.agents/skills/agnue-cli/— the open Agent Skills standard read by GitHub Copilot, OpenCode, Kilo and other agents. Installs into your user profile by default, or into the current project with--project;--agent claudeor--agent agentswrites only one of the two. A repeat run overwrites.agnue skill --install(Claude Code user profile only, in 0.5) still works and now installs both.
0.5.2
Added
agnuewith no command prints a quick-start guide (whereagnue.tomlgoes, a first upload, a link to the full guide) instead of an argparse usage error.--helpshows the same, with the commands listed under "commands".
0.5.1
Fixed
- The changelog now records the 0.5.0 changes under 0.5.0; the 0.5.0 package shipped with them still under "Unreleased" (it is part of the PyPI page). Docs only — no code changes since 0.5.0.
0.5.0
Added
agnue sources template | validate | register | list: register data sources from JSON spec files, meant for AI coding agents.validateis a server dry run;registeruploads the sample (or stores the ZentraCloud credential), sends an optional help request, and writes the assigned ID back into the spec so re-runs are safe. Needs a platform that assigns data source IDs (domainin the create request).- Lookups
agnue domains,agnue badm-variables,agnue locations,agnue credentials list, andagnue api METHOD PATH [--data @body.json]for any other endpoint. agnue skill [--install]prints the agent instructions shipped in the package, or installs them to~/.claude/skills/agnue-cli/SKILL.md.--delete-after-upload/upload(..., delete_after_upload=True)deletes the local file once the platform or S3 confirms it has it. Never deletes a file that was only queued locally, or one seen to change after it was read. A write in the instant before deletion is not caught, so exclude files the logger is still writing to.agnue upload --config PATHreads a config file other than./agnue.toml, like thesourcescommands.agnue uploadtakes several paths or patterns; a pattern starting with!excludes matching files (same as--exclude). A file matched by more than one pattern is sent once.
0.4.0
Breaking
- Removed Parquet conversion and the
convertargument ofupload(). 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-convertandpip 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-compressorupload(..., compress=False).
0.3.0
Breaking
- Removed
AgNUEClient.verify_upload()andAgNUEClient.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.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agnue_push-0.6.0.tar.gz | 46.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agnue_push-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 69.2 kB
Release files / agnue_push-0.6.0.tar.gz
| Download URL | agnue_push-0.6.0.tar.gz |
|---|---|
| Size | 46.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3264bd6cfb87071b1df13a1129479ebb7a47bc9621ceebb4f50fe0b59be350f6
|
|
BLAKE2b-256 checksum How to use checksums |
6a486459930f42df01aceb657a750039ab071e1d6f243662872fa3557e9b66ad
|
| 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 22, 2026.
Transparency logRelease files / agnue_push-0.6.0-py3-none-any.whl
| Download URL | agnue_push-0.6.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5052bb0a6e3beeda9729b46b5d9cbee5a2c53fa50e7e3a87a8c8ba279759504
|
|
BLAKE2b-256 checksum How to use checksums |
52c5573e320c2633de1424491207f19294c8d05d0b0e82c6a55cfdf9078cdec0
|
| 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 22, 2026.
Transparency logSecurity for agnue-push 0.6.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.
Attestation for agnue_push-0.6.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 22, 2026.
Transparency logA 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.