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
- Host: GitHub
- URL: https://github.com/brokensource/typenaut
- Owner: BrokenSource
- Created: 2025-08-26T01:44:18.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-05T03:24:39.000Z (9 months ago)
- Last Synced: 2025-09-05T05:27:55.076Z (9 months ago)
- Topics: python, typst
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/readme.md
Awesome Lists containing this project
README
> [!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.