Sitelet https://github.com/dzhalaevd/caxton
Skip to content
dzhalaevdPublic

About

๐Ÿ“ Declarative Python library for describing and generating documents

Topics

Resources

Contributing

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Caxton

CI Codecov PyPI version Python versions License: MIT


Caxton is a typed, declarative Python library for building spreadsheet documents from application data and rendering them to XLSX. Users define the document structure and semantics; Caxton handles layout, compilation, and backend-specific output.

Warning

Caxton is pre-alpha and is not ready for production use. The public DSL may change until 1.0.0.

๐Ÿ“š 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 License.

Installation

Caxton requires Python 3.10 or newer. Install it 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

10 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages