Metadata-Version: 2.4
Name: pytigon-lib
Version: 0.260629
Summary: Pytigon library — Python/Django application framework with multi-format rendering and indentation-based HTML preprocessor
Author-email: Slawomir Cholaj <slawomir.cholaj@gmail.com>
License: LGPL-3.0-only
Project-URL: Documentation, https://pytigon.github.io/pytigon-lib
Project-URL: Repository, https://github.com/pytigon/pytigon-lib
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=6.0
Requires-Dist: django-environ>=0.10
Requires-Dist: rules>=3.5
Requires-Dist: lxml>=4.6
Requires-Dist: fs>=2.4
Requires-Dist: httpx>=0.20
Requires-Dist: cryptography>=3.4
Requires-Dist: fpdf2>=2.5
Requires-Dist: Pillow>=9.0
Requires-Dist: python-docx>=0.8
Requires-Dist: htmldocx>=0.1
Requires-Dist: xlsxwriter>=3.0
Requires-Dist: openpyxl>=3.0
Requires-Dist: markdown>=3.3
Requires-Dist: pyquery>=1.4
Requires-Dist: python-dateutil>=2.8
Requires-Dist: autobahn>=22.0
Requires-Dist: pyexcel>=0.7
Requires-Dist: pyexcel-xlsx>=0.6
Requires-Dist: pyexcel-ods3>=0.6
Requires-Dist: llvmlite>=0.40
Requires-Dist: plotly>=5.0
Requires-Dist: numpy>=1.20
Requires-Dist: pscript>=0.7
Requires-Dist: svglib>=1.1
Provides-Extra: dev
Requires-Dist: ruff>=0.3; extra == "dev"
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-django>=4.5; extra == "dev"
Dynamic: license-file

# pytigon-lib

**Pytigon** is a full-stack Python/Django application framework designed for building web applications across multiple environments: desktop, web server, Android, and WebAssembly (Emscripten).

This library (`pytigon-lib`) is the core component of the Pytigon platform, providing:

- **Multi-format document rendering** — Convert HTML to PDF, DOCX, XLSX, and Cairo graphics
- **Indentation-based HTML preprocessor (ihtml)** — Write templates in a concise, Python-like indented syntax
- **Django extensions** — Auto-generated CRUD views, GraphQL integration, custom model/form fields
- **Spreadsheet processing** — Transform ODF (.ods) and OOXML (.xlsx) spreadsheets
- **Virtual filesystem** — Unified API for local and Django storage backends
- **Task scheduling** — Background task scheduling with cron-like patterns
- **HTTP/WebSocket tools** — REST clients, ASGI bridges, OAuth2 helpers

## Installation

```bash
pip install pytigon-lib
```

With optional dependencies:

```bash
pip install pytigon-lib[spreadsheet,llvm,plotting,svg]
```

## Quick start

### Render HTML to PDF

```python
from pytigon_lib.schhtml.main import html_to_pdf

html_content = "<html><body><h1>Hello World</h1></body></html>"
with open("output.pdf", "wb") as f:
    f.write(html_to_pdf(html_content))
```

### Auto-generate Django CRUD views

```python
from pytigon_lib.schviews import GenericTable

GenericTable(MyModel).register()
```

## Requirements

- Python 3.8+
- Django >= 6

## License

LGPLv3 — see [LICENSE](LICENSE)
