current-data-py
Python SDK for robotics Protobuf messages, TD files, and platform service clients. Run shell commands from the repository root in the shared development environment.
Use locally
Run the bundled examples to write and read a local TD file using the installed SDK:
python -I -m current_data_py.examples.write_td /tmp/current-data-example.td
python -I -m current_data_py.examples.read_td /tmp/current-data-example.td
-I avoids importing the unbuilt source directory in place of the installed package.
See examples for other entry points.
For a minimal read-only service call, run this snippet with python -I so it uses
the installed SDK:
from contextlib import closing
import os
os.environ["ENV"] = "test"
from current_data_py.management import ManagementClient, MetadataFilter
with ManagementClient() as client:
with closing(client.stream_data_references(MetadataFilter(), timeout=30)) as records:
record = next(records, None)
print(record.id if record is not None else "No matching data")
Set ENV=test before the first SDK import to select the test service; an unset or
empty value defaults to production. An explicit client address= overrides the
default. Remote examples require service connectivity and accessible data.
Downloads and remote reads default to the storage provider's
internal endpoint (OSSClient / TOSClient read permission, download_data,
open_data, and open_td). Outside that cloud network, pass
use_internal_endpoint=False; there is no automatic public fallback. A supplied
TOS endpoint selects that public address unless internal networking is explicitly
requested, which remains an error. Uploads still default to public networking.
OSS open_td without bucket infers the selected provider's unique bucket from
metadata; multiple buckets require an explicit selection. The SDK manages temporary
credentials for uploads, downloads and remote TD reads.
Calibration workers can import GLOVE_CALIBRATION_REPORT_URL from
current_data_py for the environment's HTTPS Collection callback endpoint on
DEFAULT_ADDRESS (port 443).
Processing supplies ENV to the Job; set it before the first SDK import.
The worker needs network access to that platform domain.
Upload files
Use OSSClient or TOSClient with upload permission. The management service
selects the bucket and allowed object prefix. Both clients
require data_type and data_kind; keep the management client open during transfers:
from current_data_py.management import ManagementClient
from current_data_py.tos import TOSClient
with ManagementClient() as management:
with TOSClient(management, permission="upload", data_type="YAM",
data_kind="CONVERTED") as storage:
storage.upload_file(storage.object_prefix + "recording.td", "/data/recording.td",
multipart_threshold=100 * 1024**2,
part_size=16 * 1024**2, max_workers=4)
Both clients accept the same transfer options. Files at or above
multipart_threshold use multipart upload; 0 forces multipart for nonempty
files. Empty files always use PutObject. Sizes are in bytes. part_size must be
5 MiB–5 GiB, and the file must fit within 10,000 parts; increase it for larger
files. max_workers controls parallel requests (1–64); part buffers use roughly
part_size * max_workers memory, plus SDK overhead. Do not modify the source
file during upload.
Uploads reject existing objects by default, including when completing multipart
uploads. Set forbid_overwrite=False to replace one. Content type and metadata
are preserved. The return value is the provider's PutObject result for small
files or CompleteMultipartUpload result for multipart files.
Failed multipart transfers attempt to abort and delete incomplete parts. A failed
cleanup emits a warning; check the bucket's incomplete uploads. The upload role
and its scoped STS policy must allow oss:AbortMultipartUpload or
tos:AbortMultipartUpload in addition to PutObject. Deploy the management-service
policy update and ensure the underlying cloud role permits cleanup before use.
There is no persistent checkpoint: a later call starts a new upload. Uploading
does not register the data; call ManagementClient.register_data separately.
URDF packages
Use ManagementClient.upload_urdf(directory, entrypoint, info=...) to check local
dependencies, upload source files without overwriting objects, and register one
asset under a new UUID on each call. Keep the directory unchanged throughout the
call; validation, hashing and upload read the source directly without private
copies. Failed calls leave uploaded objects in place and do not resume or recover
registration on a later call.
STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
checked in preview. The result is the locally generated asset UUID; model lists
provide URDF URLs. See the
URDF guide and run python -I -m current_data_py.examples.upload_urdf --help.
Test changes
The package bundles generated Protobuf modules during its build. After protocol changes, regenerate the bindings first. Build into a fresh temporary directory, validate the artifacts, and install this checkout's wheel before running its checks. Only the local package is installed; shared dependencies are left unchanged:
(
set -e
sdk_dist=$(mktemp -d)
trap 'rm -rf "$sdk_dist"' EXIT
(cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
python -I "current_data_py/tests/check_${check}.py"
done
)
These checks cover packaging, environment selection, clients, and media decoding using local fixtures and mocked services. They do not require production credentials or prove connectivity to a deployed service.
Publish to PyPI
Ordinary CI builds a temporary package and tests the installed wheel. It does not retain SDK release artifacts or upload to a package index.
- Run Release from
main, selectenvironment=test, and checkcurrent_data_py. Leave service selections,commit, andsdk_versionempty. It creates a PR that increasesproject.versionto the next unused patch version (for example,0.1.20→0.1.21). Review and merge it to start SDK Publish. Major/minor version changes can still use a manual version PR. - The workflow checks generated Protobuf files, builds and tests the wheel/sdist,
retains them for 90 days, and uploads them to TestPyPI.
verify_testchecks remote SHA-256 digests and installs the package in a clean environment. - Complete functional testing against the test services. TestPyPI publication
does not update existing SDK consumers; install the exact version and set
ENV=testbefore importing the SDK. Registry selection and service environment selection are independent. - Run Release from
main, selectenvironment=prod, checkcurrent_data_py, and enter the verifiedsdk_version. Leave service selections andcommitempty. It creates a PR containing the tested version, source SHA, run/attempt, artifact ID and file digests. - Obtain owner approval on the release PR's latest commit and merge it. The
workflow downloads those exact distributions and publishes them to PyPI;
it does not rebuild them or use newer SDK source.
verify_prodchecks remote digests and installation. Production consumers must explicitly upgrade.
A test version with code changes needs a new version number. Re-run failed jobs for upload or verification failures: matching existing files are accepted and only missing files are uploaded. Conflicting files, expired artifacts, and unverified test releases block promotion. Do not delete and recreate artifacts or rebuild an expired candidate under the same version; publish a new test version. Versions that fail testing may be absent from production PyPI.
See CI/CD configuration for publisher setup, permissions and workflow tests. Review package metadata and bundled documentation for public distribution before merging a version update.
Metadata
Release files for current-data-py 0.1.21
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 | Actions |
|---|---|---|---|---|
| current_data_py-0.1.21.tar.gz | 138.3 kB | With provenance | Details for current_data_py-0.1.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| current_data_py-0.1.21-py3-none-any.whl | Python 3 | none | any | Details for current_data_py-0.1.21-py3-none-any.whl |
Total release size: 301.2 kB
Release files / current_data_py-0.1.21.tar.gz
| Download URL | current_data_py-0.1.21.tar.gz |
|---|---|
| Size | 138.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dd760d9bb222950c4cf39bc222b637c6937c43607de68a9be02ea2d36424191
|
|
BLAKE2b-256 checksum How to use checksums |
88e95f7fa2c4e0672a905c43e81f47b94d489f36a2cb7c05e0d3e78a7ad2cebd
|
| 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 Nov 17, 2026.
Transparency logRelease files / current_data_py-0.1.21-py3-none-any.whl
| Download URL | current_data_py-0.1.21-py3-none-any.whl |
|---|---|
| Size | 162.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e84012fe71bb2be9840c6878846d6e59062b2bb24f966c32aa1ff97bceeb1a9d
|
|
BLAKE2b-256 checksum How to use checksums |
83cd467771b3fc0d02b4820c4e9bd49d16605e1675e00c4f520d146e287befb1
|
| 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 Nov 17, 2026.
Transparency logSecurity for current-data-py 0.1.21
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
Both files in this release have been uploaded with provenance metadata.
Attestation for current_data_py-0.1.21.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 Nov 17, 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.