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.0

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.0
File Size Uploaded
tublub-0.8.0.tar.gz 21.5 kB Details

Built distribution (wheel)

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

Total release size: 44.7 kB

Release files / tublub-0.8.0.tar.gz

Download URL tublub-0.8.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
17007a5620f20c534b3514ed03f12b001adc804b03e0ead234f0804d327faa8b
BLAKE2b-256 checksum
How to use checksums
046069fce8396c05b5a235b55f4b44a04b5b4f19a36274713d8392362ce667ee
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 7, 2026.

Transparency log

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

Download URL tublub-0.8.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b10020e9f4f07572ddbc2988d9723ca97ab5f676245f690e7e63e4e9eea14338
BLAKE2b-256 checksum
How to use checksums
03c013288826c13ba89bb50cf51342023ae0238828826f9d0d6cc491fd16ba20
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

2 release files

This release

0.8.0 This release

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