Skip to main content

tublub

PyPI Tests

Convert or view tabular data files — CSV, JSON, XLSX, YAML, and more — from the command line.

tublub is a thin wrapper around Tablib. Tablib reads and writes plenty of formats, but it won't open the files for you — you have to know which ones need binary mode, special newline handling, and so on. tublub bakes that per-format knowledge in, so you just point it at a file and it works.

$ tublub --list-formats
Available formats: json xlsx xls yaml csv tsv ods dbf html jira latex rst sql cli

$ tublub input.json
Username      Identifier  First name    Last name
booker12            9012  Rachel        Booker
grey07              2070  Laura         Grey
jenkins46           9346  Mary          Jenkins
johnson81           4081  Craig         Johnson
smith79             5079  Jamie         Smith

$ tublub input.json output.xlsx

$ file output.xlsx
output.xlsx: Microsoft Excel 2007+

$ tublub -t csv input.json
Username,Identifier,First name,Last name
booker12,9012,Rachel,Booker
grey07,2070,Laura,Grey
jenkins46,9346,Mary,Jenkins
johnson81,4081,Craig,Johnson
smith79,5079,Jamie,Smith

$ tublub -o book.xlsx sales.csv users.json regions.tsv
Saved 'book.xlsx', 3 sheets (xlsx)

With -o, all positional arguments are inputs. Two or more inputs become sheets in a single multi-sheet file (XLSX, ODS, JSON, YAML, ...) — every sheet of every input, so multi-sheet inputs are expanded rather than truncated. Sheets keep their own names, and a whole-file input is named after its file stem; names are only changed when two would collide.

An existing output file is never overwritten silently: at a terminal tublub asks first, and in a script or a pipe it refuses, since nothing there can answer the question. Decide up front with -y (always overwrite) or -n (never overwrite).

Reading an existing multi-sheet workbook works the other way round: -l lists its sheets, -s picks them by index or title, and a conversion with no selection converts every sheet the target format can hold.

$ tublub -l book.xlsx
[0] people  2 rows x 2 cols
[1] cities  2 rows x 2 cols

$ tublub -s cities book.xlsx
city          pop
Stockholm  975904
Goteborg   583056

$ tublub book.xlsx out.ods
Saved 'out.ods', 2 sheets (ods)

Installation

pipx install tublub

or, equivalently, uv tool install tublub. Either one gets you the tublub command; pipx (1.5 and later) additionally puts the manual page on your manpath, so man tublub works.

Documentation

The manual page is the authoritative reference for every flag, for sheet selection, and for what happens when a format can not hold what you asked it to. Read it with man tublub once installed, and tublub --help for a quick reminder of the flags.

News and Changes

Please see the changelog for more details.

Metadata

Release files for tublub 0.8.1

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

Source distribution (sdist)

Source distribution for tublub 0.8.1
File Size Uploaded
tublub-0.8.1.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tublub 0.8.1
File Interpreter ABI Platform
tublub-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 47.1 kB

Release files / tublub-0.8.1.tar.gz

Download URL tublub-0.8.1.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab8fb62eceecaeea0655afb5a596a1c0d5bcdcb5164817700ce01963a21a2873
BLAKE2b-256 checksum
How to use checksums
cc79c6014cac351a45b79ad95ab9bdadce84f2ef5562a941e78a8855f4405c99
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 Aug 8, 2026.

Transparency log

Release files / tublub-0.8.1-py3-none-any.whl

Download URL tublub-0.8.1-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecb667a8b0c7549aa61b317664ed421e98a96d1c0df2baa1387d615215335b25
BLAKE2b-256 checksum
How to use checksums
500cfae5dd44d905ae074b95d25dd9c68d1fdb669b2929d875c6a863cf6ca4ee
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 Aug 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

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