Python runtime for the @barefootjs/jinja adapter
Project description
barefootjs
Python runtime for BarefootJS marked templates, targeting Jinja2.
BarefootJS is a fine-grained reactive TSX compiler: you write components in TSX, and the compiler emits templates for your backend's template engine plus the client-side JS that hydrates them. This package is the server half for Python — it renders the .jinja templates produced by the @barefootjs/jinja adapter.
Installation
pip install barefootjs
The only dependency is jinja2; everything else is stdlib.
Quick start
Generated .jinja templates call the BarefootJS instance as a bf object ({{ bf.scope_attr() }}, {{ bf.json(x) }}, {{ bf.spread_attrs(bag) }}):
from barefootjs import BarefootJS, JinjaBackend
backend = JinjaBackend(paths=["templates"])
bf = BarefootJS(None, {"backend": backend})
html = backend.render_named("counter", bf, {"count": 0})
Package layout
| Module | Role |
|---|---|
runtime.py |
the engine-agnostic bf object |
evaluator.py |
ParsedExpr evaluator for the *_eval helpers |
search_params.py |
searchParams() SSR reader |
backend_jinja.py |
the Jinja2 engine backend |
Documentation
- barefootjs.dev — core documentation
- GitHub: piconic-ai/barefootjs — monorepo (this package lives at
packages/adapter-jinja/python)
License
MIT
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 barefootjs-0.18.4.tar.gz.
File metadata
- Download URL: barefootjs-0.18.4.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93243929be2e3e5e147e09266c97b6042595d28ea0214bc014795d90c2c296fe
|
|
| MD5 |
df1ae69bd8eac4ec1717ebcefd382947
|
|
| BLAKE2b-256 |
f3e517bb7af5a36f01e80ce7ed48a1f8adca676199a66c2d5145008beee95f32
|
Provenance
The following attestation bundles were made for barefootjs-0.18.4.tar.gz:
Publisher:
release.yml on piconic-ai/barefootjs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barefootjs-0.18.4.tar.gz -
Subject digest:
93243929be2e3e5e147e09266c97b6042595d28ea0214bc014795d90c2c296fe - Sigstore transparency entry: 2111580955
- Sigstore integration time:
-
Permalink:
piconic-ai/barefootjs@6716bc1508a1b6ef6b19e05134fd52b0c8bcbcfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/piconic-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6716bc1508a1b6ef6b19e05134fd52b0c8bcbcfb -
Trigger Event:
push
-
Statement type:
File details
Details for the file barefootjs-0.18.4-py3-none-any.whl.
File metadata
- Download URL: barefootjs-0.18.4-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c033ca412401d8b3fcd3630cd9b42f730f268110b1d9753596a7009904e80605
|
|
| MD5 |
b3a2a0c275d7c5d1a321f9cb60186a3e
|
|
| BLAKE2b-256 |
9b52d0162a0a07066e8d1bcc57ac065eeddf43a355a8c387931a643620724a1d
|
Provenance
The following attestation bundles were made for barefootjs-0.18.4-py3-none-any.whl:
Publisher:
release.yml on piconic-ai/barefootjs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
barefootjs-0.18.4-py3-none-any.whl -
Subject digest:
c033ca412401d8b3fcd3630cd9b42f730f268110b1d9753596a7009904e80605 - Sigstore transparency entry: 2111581258
- Sigstore integration time:
-
Permalink:
piconic-ai/barefootjs@6716bc1508a1b6ef6b19e05134fd52b0c8bcbcfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/piconic-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6716bc1508a1b6ef6b19e05134fd52b0c8bcbcfb -
Trigger Event:
push
-
Statement type: