Backend-first SPA framework in Python.
Project description
LUA-SPA
Backend-first SPA framework in Python.
This project includes:
- LuaTemplate file served by the backend
.lspacomponents (HTML + Python) with component import support- Client hydration at component level
- DOM diff renderer inspired by React's virtual DOM flow
useStatehook-style state management- Base app definitions isolated in
lua_template/spa.config.json
Requirements
- Python 3.10+
- Poetry installed
How to use
Install locally (development)
poetry install
Create a new project
lua-spa create my_project
lua-spa create my_project ./apps
Run the application
poetry run lua-spa serve
Enable hot reload:
poetry run lua-spa serve --reload
Open in browser:
http://127.0.0.1:8000
Documentation
Docs are available in the docs/ directory:
Run locally:
cd docs
npx docusaurus start
Project Structure
lua-spa/
pyproject.toml
src/
lua_spa/
app.py
framework.py
main.py
lua_template/
index.lspa
spa.config.json
components/
tests/
Tests
poetry run pytest
With coverage:
poetry run pytest --cov=src/lua_spa --cov-report=term
Component Format
Components are .lspa files composed of:
- optional imports
<python>block (executed on backend)<template>block (HTML)
Project details
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 lua_spa-1.0.0.tar.gz.
File metadata
- Download URL: lua_spa-1.0.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a273272a2cce6cf5e556dbf81ed91d5fc10147991039fef42863bcef6e84ff8
|
|
| MD5 |
3bd05b7adcfac42e8dc3f721ff4f1831
|
|
| BLAKE2b-256 |
79a6a09941275d6f1427334e3c252311600c92b1964e972b0c27beb85d5bee46
|
Provenance
The following attestation bundles were made for lua_spa-1.0.0.tar.gz:
Publisher:
release-and-deploy.yaml on roderiano/lua-spa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lua_spa-1.0.0.tar.gz -
Subject digest:
6a273272a2cce6cf5e556dbf81ed91d5fc10147991039fef42863bcef6e84ff8 - Sigstore transparency entry: 1438578648
- Sigstore integration time:
-
Permalink:
roderiano/lua-spa@aaf1e3951cc08afb9514d989e6aa38868d0c720e -
Branch / Tag:
refs/heads/release - Owner: https://github.com/roderiano
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-deploy.yaml@aaf1e3951cc08afb9514d989e6aa38868d0c720e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lua_spa-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lua_spa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17e812378a131575dbfd3fc809628c1fa364ec8851dff5d4a5ee56e338acf609
|
|
| MD5 |
2b72e1a6a1907abb5bd0204e58a408b5
|
|
| BLAKE2b-256 |
49e2d43e2db43158301c111c8e639d17440658c19f5e7a5ec11d33da050657a8
|
Provenance
The following attestation bundles were made for lua_spa-1.0.0-py3-none-any.whl:
Publisher:
release-and-deploy.yaml on roderiano/lua-spa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lua_spa-1.0.0-py3-none-any.whl -
Subject digest:
17e812378a131575dbfd3fc809628c1fa364ec8851dff5d4a5ee56e338acf609 - Sigstore transparency entry: 1438578660
- Sigstore integration time:
-
Permalink:
roderiano/lua-spa@aaf1e3951cc08afb9514d989e6aa38868d0c720e -
Branch / Tag:
refs/heads/release - Owner: https://github.com/roderiano
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-deploy.yaml@aaf1e3951cc08afb9514d989e6aa38868d0c720e -
Trigger Event:
workflow_dispatch
-
Statement type: