This release is a pre-release and may not be stable for production use.
Gramlot
GRAMmar for Live Object Trees
Describe interfaces in Python and render them with the Gramlot JavaScript runtime. The first alpha includes typed Source transport, widgets and an optional FastAPI integration with automatic page discovery.
FastAPI integration
Create pages/hello.py in your application directory:
from genro_toolbox import metadata
from gramlot.page import WebPage
@metadata(title="Hello")
class Page(WebPage):
"""Display a greeting."""
def main(self, root):
root.h1("Hello World")
With Gramlot and its FastAPI extra installed:
gramlot fastapi serve /path/to/my_app
Open http://127.0.0.1:8000/page/. No main.py or JSON registry is required.
For custom servers, use GramlotApplication or mount_gramlot from
gramlot.contrib.fastapi. More integrations coming soon.
Documentation
Alpha candidate 0.1.0a1 is prepared for its first release. For local installation,
build a wheel and install it with the [fastapi] extra. See
build and release instructions.
Development
npm --prefix js/dom ci --ignore-scripts
python scripts/prepare_assets.py
python scripts/prepare_test_client.py
python -m pip install '.[test,fastapi]' httpx
GRAMLOT_CLIENT_MODULES="$PWD/build/test-client" python -m pytest -q
npm --prefix js/dom test
Documentation builds independently from runtime packages. See docs/requirements.txt.
Gramlot is licensed under Apache 2.0.
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 gramlot-0.1.0a1.tar.gz.
File metadata
- Download URL: gramlot-0.1.0a1.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f97503693d0f80e211332ee3cb2dea14af48c3efc6202d47eb91233cc09a2d8
|
|
| MD5 |
81186adcb6d2a9f03eafcfff3486c5ad
|
|
| BLAKE2b-256 |
131ec89ba62d74a2090a82d67f14cc4cb340c158085ca569cbc1b8f25a1fec31
|
Provenance
The following attestation bundles were made for gramlot-0.1.0a1.tar.gz:
Publisher:
publish.yml on genropy/gramlot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gramlot-0.1.0a1.tar.gz -
Subject digest:
0f97503693d0f80e211332ee3cb2dea14af48c3efc6202d47eb91233cc09a2d8 - Sigstore transparency entry: 2767830858
- Sigstore integration time:
-
Permalink:
genropy/gramlot@b710999ebb996239ad443fbf08d9e37709312fa7 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/genropy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b710999ebb996239ad443fbf08d9e37709312fa7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gramlot-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: gramlot-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 275.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4256e0e98c0bffef1885fd37f84fa2d4296ea48212fdda23804263173e6034e6
|
|
| MD5 |
fdb63773877e96a9f6c6e0a67e884ac3
|
|
| BLAKE2b-256 |
0e14967614f7746090ee95d4456c025e1633c7d0787978faf3d221157b434346
|
Provenance
The following attestation bundles were made for gramlot-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on genropy/gramlot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gramlot-0.1.0a1-py3-none-any.whl -
Subject digest:
4256e0e98c0bffef1885fd37f84fa2d4296ea48212fdda23804263173e6034e6 - Sigstore transparency entry: 2767830897
- Sigstore integration time:
-
Permalink:
genropy/gramlot@b710999ebb996239ad443fbf08d9e37709312fa7 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/genropy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b710999ebb996239ad443fbf08d9e37709312fa7 -
Trigger Event:
push
-
Statement type: