An open API service indexing awesome lists of open source software.

https://github.com/brokensource/typenaut

🚀 Typst code from python classes for easy templating and extra utilities
https://github.com/brokensource/typenaut

python typst

Last synced: 9 months ago
JSON representation

🚀 Typst code from python classes for easy templating and extra utilities

Awesome Lists containing this project

README

          



Typenaut


Typst code from python classes abstractions











> [!IMPORTANT]
> This project is under active development. While basic functionality works, most features are missing, no documentation exists, and anything may (and will) change anytime! Feedback is welcome 🙂

## 🔥 Description

A new experiment on typst metaprogramming within python for heavy templating.

```python
from typenaut import Document, Rectangle, Text

class Minimal(Document):
def build(self):
with Rectangle(self) as rect:
Text(rect, value="Hi, I'm inside the rectangle")

# Automated usage!
document = Minimal()
document.build()
document.pdf(output="output.pdf")
```

## 📦 Installation

> Use `pip install git+https://github.com/BrokenSource/Typenaut` until further PyPI releases are made.

## 🚀 Usage

Your best chance is on exploring the [**examples**](../examples) directory likely for a good while.

- Upstream [typst](https://typst.app/docs/) documentation is always a valuable resource!

Note: I really do not have the time to write structured documentation, but the code contains quality type hints and docstrings.

## ⚖️ License

Still deciding, currently source available.

Likely same as Typst, still studying libraries compliances.