Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Gramlot

Gramlot logo

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

gramlot-0.1.0a1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gramlot-0.1.0a1-py3-none-any.whl (275.4 kB view details)

Uploaded Python 3

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

Hashes for gramlot-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 0f97503693d0f80e211332ee3cb2dea14af48c3efc6202d47eb91233cc09a2d8
MD5 81186adcb6d2a9f03eafcfff3486c5ad
BLAKE2b-256 131ec89ba62d74a2090a82d67f14cc4cb340c158085ca569cbc1b8f25a1fec31

See more details on using hashes here.

Provenance

The following attestation bundles were made for gramlot-0.1.0a1.tar.gz:

Publisher: publish.yml on genropy/gramlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for gramlot-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4256e0e98c0bffef1885fd37f84fa2d4296ea48212fdda23804263173e6034e6
MD5 fdb63773877e96a9f6c6e0a67e884ac3
BLAKE2b-256 0e14967614f7746090ee95d4456c025e1633c7d0787978faf3d221157b434346

See more details on using hashes here.

Provenance

The following attestation bundles were made for gramlot-0.1.0a1-py3-none-any.whl:

Publisher: publish.yml on genropy/gramlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page