Skip to main content

PyBlade Logo

PyBlade

The reactive template engine for Python web frameworks.

GitHub License PyPI Downloads GitHub Stars

PyBlade is a lightweight, reactive template engine for Python. It brings reusable UI components and server-driven interactivity to your web apps using Python and HTML, without requiring a frontend framework.

[!WARNING] Beta: PyBlade is still experimental. APIs may change between releases and it is not yet recommended for production applications.

Installation

Install PyBlade from PyPI:

pip install pyblade

PyBlade integrates into your existing Python web application rather than replacing your application framework.

CLI

PyBlade includes a CLI for common development tasks:

pyblade init
pyblade serve
pyblade make:template
pyblade make:component
pyblade make:livecomponent

To see the available commands and options, run pyblade --help or pyblade <COMMAND> --help.

See the CLI documentation for more details.

Templates

PyBlade templates are regular .html files with additional syntax for layouts, conditions, loops, and components.

Layouts

@extends('layouts.base')

@block('content')
    <h1>Hello, {{ user.name }}!</h1>
@endblock

Conditions

@if(user.is_authenticated)
    <p>Welcome back, {{ user.name }}.</p>
@else
    <p>Please sign in.</p>
@endif

Loops

@for(post in posts)
    <article>
        <h2>{{ post.title }}</h2>
    </article>
@empty
    <p>No posts found.</p>
@endfor

Components

Reusable components as well as live components can be rendered directly from templates:

<pb-user-profile :user="user" />

They can also be invoked with the component directive:

@component('user-profile', {'user': user})

Framework Integration

PyBlade is designed to work with Python web frameworks and can be introduced into an existing application.

Only django is fully supported for now, we will add other frameworks support incrementally.

Editor Support

PyBlade IntelliSense for VS Code provides:

  • Syntax highlighting
  • Snippets
  • Directive completion
  • Component completion

Additional editor integrations are planned.

Project Status

PyBlade is currently in beta.

The template engine, component system, CLI, Live Components, and framework integrations are actively evolving. APIs and conventions may change before the first stable release.

If you want to follow the project, report a bug, request a feature, or share feedback, visit the GitHub repository or PyBlade Feedback.

Contributing

Contributions are welcome, including bug reports, fixes, documentation, examples, editor tooling, and new ideas.

Before contributing, please read:

You can also contribute to the wider PyBlade ecosystem:

If you discover a security vulnerability, please follow the Security Policy instead of opening a public issue.

Acknowledgements

PyBlade's template syntax is inspired by Laravel Blade, while its Live Components are inspired by Livewire.

PyBlade builds on ideas and work from the Python, Django, and Laravel communities.

Special thanks to Michael Dimchuk for graciously releasing the PyBlade name on PyPI for this project.

License

PyBlade is licensed under the BSD 3-Clause License.

Metadata

Release files for PyBlade 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyBlade 0.3.1
File Size Uploaded Provenance Actions
pyblade-0.3.1.tar.gz 194.7 kB With provenance Details for pyblade-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyBlade 0.3.1
File Interpreter ABI Platform Actions
pyblade-0.3.1-py3-none-any.whl Python 3 none any Details for pyblade-0.3.1-py3-none-any.whl

Total release size: 419.9 kB

Release files / pyblade-0.3.1.tar.gz

Download URL pyblade-0.3.1.tar.gz
Size 194.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5b448daa48da3ddefa92c5af608e06cfae41b0a99b8dfa8b47714483ec62f405
BLAKE2b-256 checksum
How to use checksums
6d0412d7bdaf8ed16e9771acdd2499d18a03d9dee18be72c36edf618f7d59394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / pyblade-0.3.1-py3-none-any.whl

Download URL pyblade-0.3.1-py3-none-any.whl
Size 225.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2004b07a8b748e170fcd26a5d1810153b354b7423e19058385bb8f804fd215c5
BLAKE2b-256 checksum
How to use checksums
9f621f6003961ce26e15b96df16460ec9c41aae2ccdf87a062f02ff310adcb4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for PyBlade 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyblade-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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