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.
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 oss tos decoding; 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
CI checks this SDK but does not publish it. Releases are manual and must use the
latest successfully fetched origin/main, including the version bump. Development
branches, uncommitted changes, and older main commits are not release sources. Follow the
repository Git workflow.
Prepare the version update in pyproject.toml on a development branch and merge it
through review together with the intended SDK changes before building a release.
Use a version that has not already been published.
Build and validate
Run from the repository root. Fetch the latest origin/main, record its commit,
and build from a clean exported copy so local edits and old artifacts cannot enter
the release:
sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
(
set -euo pipefail
git fetch origin
sdk_release_sha=$(git rev-parse origin/main)
printf '%s\n' "$sdk_release_sha" > "$sdk_release_dir/source-commit.txt"
mkdir "$sdk_release_dir/source"
git archive "$sdk_release_sha" | tar -x -C "$sdk_release_dir/source"
(cd "$sdk_release_dir/source/current_data_py" && python -m build --no-isolation --outdir "$sdk_release_dir/dist")
python "$sdk_release_dir/source/current_data_py/tests/check_distribution.py" --dist-dir "$sdk_release_dir/dist"
python -m twine check "$sdk_release_dir/dist/"*
python -m pip install --no-deps --force-reinstall "$sdk_release_dir/dist/"*.whl
(
cd "$sdk_release_dir"
unset PYTHONPATH PYTHONHOME
for check in package environment management labeling remote oss tos decoding; do
python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
done
)
(cd "$sdk_release_dir/dist" && sha256sum *) > "$sdk_release_dir/SHA256SUMS"
)
Release checks run outside both source trees so child Python processes also use
the installed wheel. They come from the recorded origin/main commit; unmerged
local test fixes are not included in the export.
Continue only after every check succeeds. Confirm source-commit.txt contains the
intended main commit and inspect the wheel for the intended release features.
Review the built package's README metadata for public display; exclude private
deployment addresses, bucket names, and credentials. Keep the release directory
and use these exact validated artifacts for uploading.
Upload
Use your configured PyPI credentials or Twine's interactive token prompt; do not
put tokens in the README or shell commands. Run from the repository root in the
same shell that defines sdk_release_dir.
Fetch main again immediately before uploading. If its commit has changed, rebuild and rerun all checks from the new latest main. The command also checks that the artifacts still match the hashes recorded after validation:
(
set -e
sdk_repository=pypi
git fetch origin
if [ "$(git rev-parse origin/main)" != "$(cat "$sdk_release_dir/source-commit.txt")" ]; then
echo "origin/main changed; rebuild and validate the latest main before uploading." >&2
exit 1
fi
(cd "$sdk_release_dir/dist" && sha256sum -c ../SHA256SUMS)
python -m twine upload --repository "$sdk_repository" "$sdk_release_dir/dist/"*
)
For an optional TestPyPI trial, change sdk_repository=pypi to
sdk_repository=testpypi in the same block and use TestPyPI credentials. Both
registries require the latest-main and artifact checks.
Verify the release
After upload, verify that PyPI shows the expected version and rendered description.
Compare the SHA-256 digests of both published files with SHA256SUMS, and retain
that file with source-commit.txt as the release record. An optional TestPyPI trial
does not replace verification of the production PyPI release.
Metadata
Release files for current-data-py 0.1.13
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.13.tar.gz | 58.8 kB | Without provenance | Details for current_data_py-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| current_data_py-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for current_data_py-0.1.13-py3-none-any.whl |
Total release size: 143.8 kB
Release files / current_data_py-0.1.13.tar.gz
| Download URL | current_data_py-0.1.13.tar.gz |
|---|---|
| Size | 58.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30dc314f37320fa6b751a7555a50eef60db7a725a18df4c5bfd82550cb98edd9
|
|
BLAKE2b-256 checksum How to use checksums |
b05bf3969fad7dc6a172d82b6741b47f5e296aec6ecb80ec8ef4d90b65f51616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / current_data_py-0.1.13-py3-none-any.whl
| Download URL | current_data_py-0.1.13-py3-none-any.whl |
|---|---|
| Size | 85.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9b1edc631a7ba68e90cdd824de4d54914f388438b5896a8ed3d4a6078d2ca18
|
|
BLAKE2b-256 checksum How to use checksums |
54decc76c18b7b71bc561da55b1dfb9ed289cf42c2cf628881fbe2040ffa9fa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for current-data-py 0.1.13
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.