Skip to main content

flat-file-renderers

License Python QA Coverage Publish Docs pre-commit

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})

Modules

  • flat_file_renderers.base - BaseRenderer, ZipFileEntry
  • flat_file_renderers.flat_dict_list_helper - FlatDictListHelper, the flattening engine shared by every renderer
  • flat_file_renderers.separated_value - CsvRenderer, TsvRenderer
  • flat_file_renderers.json - JsonRenderer
  • flat_file_renderers.html - HtmlRenderer
  • flat_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.1.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 flat-file-renderers 0.1.0
File Size Uploaded Provenance
flat_file_renderers-0.1.0.tar.gz 18.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flat-file-renderers 0.1.0
File Interpreter ABI Platform
flat_file_renderers-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.3 kB

Release files / flat_file_renderers-0.1.0.tar.gz

Download URL flat_file_renderers-0.1.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
97a512c87b774d58701156ee37f5a6de49668d33fcc7f2bd6fee9f851c1b5365
BLAKE2b-256 checksum
How to use checksums
4aec27cfd11018357257553ecf8f450b9ea72fc691bfa83947b3d0c066fa862e
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 17, 2026.

Transparency log

Release files / flat_file_renderers-0.1.0-py3-none-any.whl

Download URL flat_file_renderers-0.1.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87f3ac912958bf0efb5267c3db0a78e677170cf713fc590a3ccd012db34232a1
BLAKE2b-256 checksum
How to use checksums
ce6b697a4f07c1bf0d0962c6a3059081d8c6274b04e06987844eb2f73dc636f6
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 17, 2026.

Transparency log

Security for flat-file-renderers 0.1.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.

Select from 2 files

Attestation for flat_file_renderers-0.1.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 17, 2026.

Transparency log

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

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