Install & Compatibility
Where this runs
tested against v1.54.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.940 runs
installs and imports cleanly · install 0.0s · import 0.117s · 98.9MB
glibcpy 3.10–3.940 runs
installs and imports cleanly · install 8.8s · import 0.110s · 98MB
96MB installed
● package 96MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
tabulator
✓ import tabulator
✗ import dataflows_tabulator
The PyPI package is `dataflows-tabulator`, but the importable module is `tabulator`.
Stream
✓ from tabulator import Stream
This quickstart demonstrates how to read a local CSV file using `tabulator.Stream`. It opens the stream, prints headers, iterates through rows as lists, and then closes the stream. `headers='first-row'` automatically infers headers from the first row of the data source.
import tabulator
import os
# Example CSV data (in-memory string for quickstart)
csv_data = "id,name\n1,Alice\n2,Bob"
# Create a simple CSV file for demonstration
file_path = 'example.csv'
with open(file_path, 'w', encoding='utf-8') as f:
f.write(csv_data)
# Read the data using tabulator
# For local files, simply pass the path
table = tabulator.Stream(file_path, headers='first-row')
table.open()
print("Headers:", table.headers)
print("Rows:")
for row in table:
print(row)
table.close()
# Cleanup (optional)
os.remove(file_path)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dataflows_tabulator'
The Python package `dataflows-tabulator` is installed, but you tried to import it using its PyPI name with underscores, which is not the correct module name.
fixChange your import statement from `import dataflows_tabulator` to `import tabulator`.
tabulator.errors.TabulatorException: Missing dependency for 'json' format. Please install 'ijson'.
You are attempting to read a JSON file, but the optional `ijson` dependency (needed for efficient JSON parsing) has not been installed.
fixInstall the `json` extra for `dataflows-tabulator`: `pip install dataflows-tabulator[json]` or `pip install ijson` directly.
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x__ in position _: invalid start byte
The file you are trying to read is not encoded in UTF-8, but `tabulator` defaults to UTF-8 for text files.
fixSpecify the correct encoding when creating the stream, for example: `tabulator.Stream('data.csv', encoding='latin-1')`. Common alternative encodings include 'latin-1', 'cp1252', or 'iso-8859-1'. Upgrade
Version history
1.54.3latest on PyPI · released Mar 24, 2024
Audit
Dependencies
datapackagerequiredCore dependency for data packaging concepts
jsonpath-rw-extrequiredRequired for JSON path operations
jsonschemarequiredRequired for JSON schema validation
tableschemarequiredCore dependency for table schema management
openpyxlrequiredRequired for reading/writing modern Excel files (.xlsx)
xlrdrequiredRequired for reading legacy Excel files (.xls)
xlwtrequiredRequired for writing legacy Excel files (.xls)
odfpyrequiredRequired for reading/writing Open Document Spreadsheet files (.ods)
clickrequiredCommand-line interface toolkit
mistunerequiredMarkdown parser (used for some internal documentation/rendering)
ijsonoptionalOptional: Required for efficient parsing of large JSON files
beautifulsoup4optionalOptional: Required for reading HTML tables
lxmloptionalOptional: Required for efficient HTML parsing
sqlalchemyoptionalOptional: Required for reading/writing SQL database tables