Skip to main content
Pre-release

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

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.0b1

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.0b1
File Size Uploaded
pyblade-0.3.0b1.tar.gz 188.4 kB Details

Built distribution (wheel)

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

Total release size: 412.5 kB

Release files / pyblade-0.3.0b1.tar.gz

Download URL pyblade-0.3.0b1.tar.gz
Size 188.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4bcc26819c87c7065f8413d68853c3e5928491ed14ada8ee5a451968a6d79678
BLAKE2b-256 checksum
How to use checksums
a832d8380c5d4e99d9c3ed54965df8076a758e5833ea79359d6f809093d9abd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Parrot Security","version":"7.2","id":"echo","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pyblade-0.3.0b1-py3-none-any.whl

Download URL pyblade-0.3.0b1-py3-none-any.whl
Size 224.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34b0fd8f6a38bc826e3de45cc46b713faba787440aade85aa8b0f73a4a718f0d
BLAKE2b-256 checksum
How to use checksums
a61d7123327f6e8aca1bf74bc2437b8e03cd28c53eb343eabd20e98995e4f7fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Parrot Security","version":"7.2","id":"echo","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.3.0b1 This release

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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