flat-file-renderers
Render tabular/nested datasets - a list of dicts, a dict of {"rows": [...], "cols": [...]},
a QuerySet-like iterable, or record/model objects - into xlsx, csv, tsv, json, html or parquet
files, zipped. Nested lists of dicts are flattened automatically into dot+index-notation columns
(contacts.1.phone, contacts.2.phone, ...), and a dict[str, dataset] renders one file per key
into the same zip (one sheet per key for xlsx, one file per key for the others).
No required dependencies for csv/tsv/json/html. xlsx and parquet are optional extras.
Installation
pip install flat-file-renderers # csv, tsv, json, html - zero extra dependencies
pip install flat-file-renderers[xlsx] # + openpyxl, for XlsxRenderer
pip install flat-file-renderers[parquet] # + pyarrow, for ParquetRenderer
pip install flat-file-renderers[all] # everything
Quick start
from flat_file_renderers import CsvRenderer
renderer = CsvRenderer({})
zip_path = renderer.render({"dataset": [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]})
# zip_path -> Path to a .zip containing one .csv
from flat_file_renderers.xlsx import XlsxRenderer # requires the "xlsx" extra
renderer = XlsxRenderer({})
zip_path = renderer.render({"dataset": {"Students": [{"name": "Alice"}], "Courses": [{"title": "Python"}]}})
# zip_path -> Path to a .zip containing one .xlsx with two sheets
Every renderer shares the same interface (BaseRenderer.render(context) -> Path, where
context["dataset"] holds the data), so switching output formats is a one-line change:
from flat_file_renderers import CsvRenderer, TsvRenderer, JsonRenderer, HtmlRenderer
from flat_file_renderers.xlsx import XlsxRenderer
from flat_file_renderers.parquet import ParquetRenderer
for Renderer in (CsvRenderer, TsvRenderer, JsonRenderer, HtmlRenderer, XlsxRenderer, ParquetRenderer):
zip_path = Renderer({}).render({"dataset": rows})
Runnable examples for every renderer live in sandbox/.
Modules
flat_file_renderers.base-BaseRenderer,ZipFileEntryflat_file_renderers.flat_dict_list_helper-FlatDictListHelper, the flattening engine shared by every rendererflat_file_renderers.separated_value-CsvRenderer,TsvRendererflat_file_renderers.json-JsonRendererflat_file_renderers.html-HtmlRendererflat_file_renderers.xlsx-XlsxRenderer(extra:xlsx)flat_file_renderers.parquet-ParquetRenderer(extra:parquet)
See the documentation for details and more examples.
Security
Please report vulnerabilities according to SECURITY.md.
Author
Kelson da Costa Medeiros kelsoncm@gmail.com
Metadata
Release files for flat-file-renderers 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flat_file_renderers-0.2.0.tar.gz | 18.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flat_file_renderers-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 kB
Release files / flat_file_renderers-0.2.0.tar.gz
| Download URL | flat_file_renderers-0.2.0.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
861a51d0e353a24bd0fc0b032eaa06321bf47fcdab298469c0bd79650f5e8324
|
|
BLAKE2b-256 checksum How to use checksums |
295c025ecf8a788bcb2f02ad279ca13bd1a858d2717bbc463ea7fc8f12d7139d
|
| 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 Sep 18, 2026.
Transparency logRelease files / flat_file_renderers-0.2.0-py3-none-any.whl
| Download URL | flat_file_renderers-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed64cdb100ea1384ba6cbbcaca218b9dbe173209ce471b76b75a6a8d717a86a4
|
|
BLAKE2b-256 checksum How to use checksums |
0424464307533669c202a3b7b50ad364e1f631ec69884431b244d188f5dd8232
|
| 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 Sep 18, 2026.
Transparency logSecurity for flat-file-renderers 0.2.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for flat_file_renderers-0.2.0.tar.gz
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 Sep 18, 2026.
Transparency logA 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.