A high-performance template engine for Python written on top of minijinja
Project description
Fluxa is a fork of MiniJinja by Armin Ronacher, enhanced with additional features for modern Python applications.
What's Different from MiniJinja?
This fork adds several features:
- Native Async Support - True async rendering with
pyo3-async-runtimes+ tokio (not ThreadPoolExecutor) - OrJSON Integration - Fast JSON serialization/deserialization
- Pydantic Integration - Type-safe context validation
- Sandbox Mode - Secure template rendering with attribute blocking
- Debug Function - Template debugging utilities
- i18n/Gettext - Full internationalization support
Installation
pip install fluxa
# With optional dependencies
pip install fluxa[fast] # orjson for faster JSON
pip install fluxa[pydantic] # pydantic support
pip install fluxa[all] # everything
Quick Start
from fluxa import Environment
env = Environment()
result = env.render_str("Hello {{ name }}!", name="World")
print(result) # "Hello World!"
Async Support
from fluxa import AsyncEnvironment
async with AsyncEnvironment() as env:
result = await env.render_str_async("Hello {{ name }}!", name="World")
Sandbox Mode
from fluxa import SandboxedEnvironment
env = SandboxedEnvironment()
# Blocks: __class__, __mro__, __globals__, _private attributes
result = env.render_str("{{ user.name }}", user={"name": "Alice"})
Project Structure
fluxa/- Python bindings (enhanced from minijinja-py)minijinja/- Core template engine (Rust)minijinja-contrib/- Additional utilities
License
Apache-2.0 (same as MiniJinja)
Credits
- Armin Ronacher - Original MiniJinja author
- magi8101 - Fluxa fork maintainer
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 Distributions
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 fluxa-0.1.1.tar.gz.
File metadata
- Download URL: fluxa-0.1.1.tar.gz
- Upload date:
- Size: 292.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
744578fa84251a11e54a46cf6ad28799b32616e5ed19598174112f5dddf5fda7
|
|
| MD5 |
fea957e106ed1341c485cee1da87a529
|
|
| BLAKE2b-256 |
0100122b16d248780d7ac6ab52f14787caf434020b59f557c94875477e430f7b
|
File details
Details for the file fluxa-0.1.1-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: fluxa-0.1.1-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28d69645cb9e096797dfe9ee39f08063fdae34bdb5b37457df999147ef72dbf1
|
|
| MD5 |
c92b4e811dabfef3483a51e099708071
|
|
| BLAKE2b-256 |
501f22d868c5c61af0d2811a8aae58b6f3be871cd25479b4bc943b9edc731cc5
|
File details
Details for the file fluxa-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fluxa-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e137054117007fd0baf5780007c12c42ac39e507f3b4374ab65d08bd3a72f0
|
|
| MD5 |
ba55b72cdc1c280d6fd976eb9af4a67a
|
|
| BLAKE2b-256 |
bbb88aa59e24f07831a223c4e84991c65bb028dce531491f13b582ee6145e942
|
File details
Details for the file fluxa-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: fluxa-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c1f763e34684385799eac3e964135ab80819652645364eb6152fdb7bf184f81
|
|
| MD5 |
4b063865568cc38b34d378924136697c
|
|
| BLAKE2b-256 |
3fd98a71e6d61ee5566f0268c0970b7aa05289f35b6577768d4d31e6180e2dc8
|