Skip to main content

dataio

Универсальное чтение и запись таблиц: строки, списки, DataFrame, txt, csv, tsv, xlsx, json, jsonl, parquet, Google Sheets, stdin

Development

uv sync
uv run dataio --help
gate check                        # the full gate (run before every commit, on this machine)
uv run pytest --snapshot-update  # after changing a command's help; review tests/snapshots/help/

pytest fails below the coverage floor in pyproject.toml; ruff includes the security (S) rules; the gate also scans uv.lock for known vulnerabilities when osv-scanner is installed (brew install osv-scanner), and says it skipped the scan otherwise. The gate runs locally: [publish] gate_command in .agents/antagor/antagor.toml; no workflow runs it.

Release

The version is the git tag (vX.Y.Z) — pyproject.toml has no version =. Work and releases go through Antagor.

Target columns

Keep some columns, in an order, under new names; every target takes them (files, stdout, Google Sheets, records in memory). The selection comes first, then the rename. A wrong name or a clash is refused with exit 2 (INVALID_ARGUMENTS); split_by and append work with them.

write(df, "out.json", columns=["phrase", "similarity"], rename={"similarity": "score"})
dataio convert semkit-out.csv clusters.json --columns phrase,similarity --rename similarity=score

Join

Put the columns of lookups next to the rows of the main table by named key columns, as VLOOKUP does. Keys are always named (--on, or main=lookup when the names differ), never taken from same-named columns. --how is left (default), inner, right (one lookup only) or full. Keys compare as text with outer spaces trimmed, case and ё kept; an empty key matches nothing. A key repeated in a lookup adds rows and warns. A same-named lookup column gets the suffix _<lookup name>. The report counts matched and unmatched rows per lookup. A join whose target is one of its sources is destructive like convert's: it is signed off before --confirm.

join("main.csv", "out.xlsx", lookups=["prices.xlsx#Prices"], on=["phrase", "region"])
dataio join main.csv out.xlsx --lookup prices.xlsx#Prices --on phrase --on region

Install

On this machine, from a local checkout:

uv tool install .

On any other machine (any OS), once this repo is pushed to GitHub — no PyPI publish needed:

uv tool install "rb-dataio @ git+https://github.com/bolandeu/rb-dataio.git@vX.Y.Z"

Replace vX.Y.Z with the latest release tag (never install a branch). This is also how an AI agent bootstraps this CLI on a fresh machine/sandbox where it isn't installed yet — see src/rb_dataio/data/SKILL.md.

Private repo? The command above is unchanged — uv runs git under the hood, so it authenticates the same way git clone does. On a machine where the install is refused with an auth error, do one of these once:

gh auth login          # interactive login also sets up git's credential helper
gh auth setup-git      # only needed if gh was logged in with --with-token / in CI

or use the SSH form instead of HTTPS:

uv tool install "rb-dataio @ git+ssh://git@github.com/bolandeu/rb-dataio.git@vX.Y.Z"

Update an installed copy to the latest commit:

uv tool upgrade rb-dataio

After install, the command dataio is available globally, on macOS, Linux and Windows alike (no shelling out, no hardcoded POSIX paths).

To pick up later architecture changes from the cli-generator template itself, run copier update in this repo (requires this repo and the template to both be git repos).

Architecture

This project follows a fixed CLI architecture:

  • src/rb_dataio/commands/ — argument parsing only, no business logic.
  • src/rb_dataio/core/ — services, models, errors: the real logic.
  • src/rb_dataio/providers/ — external APIs/integrations.
  • src/rb_dataio/credentials/ — secrets via the OS keychain (keyring) and environment variables. Secrets never live in .rb_dataio/config.toml.
  • src/rb_dataio/output/ — human (rich) and --json rendering.

Run dataio doctor to check environment/config/auth readiness, and dataio --help for the full command surface. Every command supports --json for machine/agent consumption; errors are structured (error.code, fixed exit codes, error.action telling you what to do next) and go to stderr in human mode, so stdout is always safe to pipe.

A project can require a minimum CLI version in its .rb_dataio/config.toml ([cli] min_version = "..."); an older install refuses with exit 6 and uv tool upgrade rb-dataio fixes it.

See src/rb_dataio/data/SKILL.md for the agent-facing usage guide bundled with this package — install it into an AI tool with dataio skill install, or get it as plain text with dataio --ai (works even without file access).

Metadata

Release files for rb-dataio 0.1.35

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rb-dataio 0.1.35
File Size Uploaded Provenance Actions
rb_dataio-0.1.35.tar.gz 220.1 kB Without provenance Details for rb_dataio-0.1.35.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rb-dataio 0.1.35
File Interpreter ABI Platform Actions
rb_dataio-0.1.35-py3-none-any.whl Python 3 none any Details for rb_dataio-0.1.35-py3-none-any.whl

Total release size: 362.5 kB

Release files / rb_dataio-0.1.35.tar.gz

Download URL rb_dataio-0.1.35.tar.gz
Size 220.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8074862aeb554c975b0c874c317f69ad11c2364744524771cbf430c3e9dadee2
BLAKE2b-256 checksum
How to use checksums
81e58898ecaccf663c42aa114a9d3f0471d8860cfe2f29e4e3d21ca19d1d4ee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / rb_dataio-0.1.35-py3-none-any.whl

Download URL rb_dataio-0.1.35-py3-none-any.whl
Size 142.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
199ccf0c0a4fac591fb7b8f535432b323e10aaaa49861d3c6589fe557226c383
BLAKE2b-256 checksum
How to use checksums
3cdecd710e4c9ee1b05294f415d897855c55dab7175650fb007c8aea0a5b2dee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for rb-dataio 0.1.35

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page