Skip to content

Repository files navigation

Caxton

CI Codecov PyPI version Python versions License: MIT


Declarative Python library for describing and generating documents from application data. Users define the document structure and semantics, while renderers handle output formats and backend-specific details

Stable v1.0.0 will be released when we decide, that no longer want to freely change the public DSL

📚 Documentation
📑 Changelog

from caxton import render, sheet, spreadsheet, table, text, write

rows = [{"name": "Ada Lovelace"}, {"name": "Grace Hopper"}]

report = spreadsheet(
    sheet(
        "People",
        table(
            source=rows,
            columns=(text(source="name", title="Name"),),
        ),
    ),
)

result = render(report)

write(report, "people.xlsx")

More examples are available in the example projects

The project is licensed under the MIT

Installation

Install Caxton with pip:

pip install caxton

No additional setup is required

Works on Open-Source

If you find this project interesting, consider giving it a ⭐

About

Declarative Python library for describing and generating documents

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages