Convert tabular data files with Tablib.
Project description
tublub
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
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 input.json --format csv
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 Databook (XLSX, ODS, JSON, YAML, ...); sheet names default
to each input file's stem.
To inspect a multi-sheet input without converting it, use --list-sheets:
$ tublub --list-sheets book.xlsx
[0] people 2 rows x 2 cols
[1] cities 2 rows x 2 cols
Single-sheet formats (CSV, TSV, ...) print one row, using the file stem as the title.
News and Changes
Please see the changelog for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tublub-0.5.0.tar.gz.
File metadata
- Download URL: tublub-0.5.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74fe7d1af801ca452ad84e9b627367a6f64ef9923ac5dccc055d5b6090b59316
|
|
| MD5 |
5300b887d8fe28ab70369c844248cc1d
|
|
| BLAKE2b-256 |
2d7206ab00d60e7166076803152d36af6ad2aae8f2f6d924e779249cd1b21f74
|
Provenance
The following attestation bundles were made for tublub-0.5.0.tar.gz:
Publisher:
python-publish.yml on harkabeeparolus/tublub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tublub-0.5.0.tar.gz -
Subject digest:
74fe7d1af801ca452ad84e9b627367a6f64ef9923ac5dccc055d5b6090b59316 - Sigstore transparency entry: 1672919983
- Sigstore integration time:
-
Permalink:
harkabeeparolus/tublub@9110c6a28708059e2524145360f94801653327de -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/harkabeeparolus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9110c6a28708059e2524145360f94801653327de -
Trigger Event:
release
-
Statement type:
File details
Details for the file tublub-0.5.0-py3-none-any.whl.
File metadata
- Download URL: tublub-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36c626cf41384f3e4b286b42feb86773bbb21066cdd61f4365e6c91c098a6af3
|
|
| MD5 |
ad2ec7534e546c4ca6cb3169dc9f8907
|
|
| BLAKE2b-256 |
c51f710d0e992cb23117038d0c2b1e1bab916639212a2dae53eac569aa577a87
|
Provenance
The following attestation bundles were made for tublub-0.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on harkabeeparolus/tublub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tublub-0.5.0-py3-none-any.whl -
Subject digest:
36c626cf41384f3e4b286b42feb86773bbb21066cdd61f4365e6c91c098a6af3 - Sigstore transparency entry: 1672919988
- Sigstore integration time:
-
Permalink:
harkabeeparolus/tublub@9110c6a28708059e2524145360f94801653327de -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/harkabeeparolus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9110c6a28708059e2524145360f94801653327de -
Trigger Event:
release
-
Statement type: