Builder system for genro-bag - grammar, validation, compilation
Project description
genro-builders
Builder system for genro-bag — grammar, validation, compilation, and reactive data binding.
Installation
pip install genro-builders
Quick start
from genro_builders import BuilderBag
from genro_builders.builders import HtmlBuilder
html = BuilderBag(builder=HtmlBuilder)
body = html.body()
body.div(id='main').p('Hello, world!')
print(html.builder._compile())
Features
- Domain-specific grammars — Define elements, validation rules, and components via decorators (
@element,@abstract,@component) - Built-in builders — HTML5, Markdown, XSD (schema-driven XML)
- Compilation pipeline — Expand components, resolve
^pointerbindings, render output - Reactive applications —
BagAppBaseprovides automatic re-render on data or source changes - Validation —
sub_tagscardinality,parent_tagsconstraints, typed attribute validation
Architecture
Source Bag (recipe)
↓ compiler.compile()
Compiled Bag (components expanded, ^pointers resolved)
↓ compiler.render()
Output (HTML, Markdown, XML, ...)
With BagAppBase, data changes trigger automatic updates via the BindingManager subscription map.
Documentation
See the docs/ directory for full documentation.
License
Apache License 2.0 — Copyright 2025 Softwell S.r.l.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genro_builders-0.6.0.tar.gz.
File metadata
- Download URL: genro_builders-0.6.0.tar.gz
- Upload date:
- Size: 138.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b26da9772c8a0d96433e9dc2f01c5249fda16c46a5a4aeccdb8c8c366fc1548f
|
|
| MD5 |
8d73cc8609a21d3b6b33b7a3c21409d6
|
|
| BLAKE2b-256 |
c9a22701544ed967d464468a977f6d40880b31014ec4f63dddc57ea3335816a8
|
Provenance
The following attestation bundles were made for genro_builders-0.6.0.tar.gz:
Publisher:
publish.yml on genropy/genro-builders
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genro_builders-0.6.0.tar.gz -
Subject digest:
b26da9772c8a0d96433e9dc2f01c5249fda16c46a5a4aeccdb8c8c366fc1548f - Sigstore transparency entry: 1180578512
- Sigstore integration time:
-
Permalink:
genropy/genro-builders@9ab3e0830f02ab81d242034632b7a5a6091d2f74 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/genropy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ab3e0830f02ab81d242034632b7a5a6091d2f74 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file genro_builders-0.6.0-py3-none-any.whl.
File metadata
- Download URL: genro_builders-0.6.0-py3-none-any.whl
- Upload date:
- Size: 56.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44ea3eaacf9bb5348d50957ecaa2f8e7abf21e136254dfe69aee0ee541e59afb
|
|
| MD5 |
f440f4fe2b9d5020e55b889cf69de3e7
|
|
| BLAKE2b-256 |
78920cf7d5b2786b44aee920490dbf58dfa822ebe7502de4282715eb2e883ec8
|
Provenance
The following attestation bundles were made for genro_builders-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on genropy/genro-builders
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genro_builders-0.6.0-py3-none-any.whl -
Subject digest:
44ea3eaacf9bb5348d50957ecaa2f8e7abf21e136254dfe69aee0ee541e59afb - Sigstore transparency entry: 1180578569
- Sigstore integration time:
-
Permalink:
genropy/genro-builders@9ab3e0830f02ab81d242034632b7a5a6091d2f74 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/genropy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ab3e0830f02ab81d242034632b7a5a6091d2f74 -
Trigger Event:
workflow_dispatch
-
Statement type: