Skip to main content

qweb-rs

A Rust port of Odoo's QWeb template engine and its template inheritance, for Python.

The goal is byte-identical output to Odoo's Python engine (Odoo 20), only faster. Every rendering rule, including whitespace handling, escaping, attribute order and error classes, follows the original implementation. Differential tests and fuzzers compare the two engines.

  • Rendering: 18x to 150x faster than ir_qweb.render(), and 7x to 17x faster with cached compilation.
  • Template inheritance: 2.1x faster than Odoo's lxml implementation.

Status: experimental. qweb_rs.render() and qweb_rs.apply_inheritance() work on their own. The full ir.qweb integration needs a patched Odoo 20, which is not public yet.

Install

pip install qweb-rs

Wheels are built for Linux (x86_64 and aarch64), macOS and Windows, for every CPython ≥ 3.12 (stable ABI). Other platforms build from the source distribution, which needs a Rust toolchain.

Usage

qweb_rs.render has the same signature as Odoo's database-less odoo.addons.base.models.ir_qweb.render:

from lxml import etree
import qweb_rs

templates = {
    "hello": '<t t-name="hello"><ul><li t-foreach="items" t-as="item" t-out="item"/></ul></t>',
}

def load(name):
    return etree.fromstring(templates[name]), name

qweb_rs.render("hello", {"items": ["a", "<b>"]}, load)
# Markup('<ul><li>a</li><li>&lt;b&gt;</li></ul>')

qweb_rs.apply_inheritance(
    '<t t-name="x"><p>hi</p></t>',
    ['<xpath expr="//p" position="after"><span>new</span></xpath>'],
)
# '<t t-name="x"><p>hi</p><span>new</span></t>'

qweb_rs.Engine keeps compiled templates in a cache. It is the API that the ir.qweb integration uses.

When Odoo is importable, errors are raised as Odoo's own QWebError.

License

LGPL-3.0-only, like the Odoo code it is ported from.

Odoo is a trademark of Odoo S.A. This project is not affiliated with or endorsed by Odoo S.A.

Metadata

Release files for qweb-rs 0.1.2

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

Source distribution (sdist)

Source distribution for qweb-rs 0.1.2
File Size Uploaded Provenance Actions
qweb_rs-0.1.2.tar.gz 187.1 kB With provenance Details for qweb_rs-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qweb-rs 0.1.2
File Actions
qweb_rs-0.1.2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for qweb_rs-0.1.2-cp312-abi3-win_amd64.whl
qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_x86_64.whl CPython 3.12 abi3 Linux musl 1.2+ x86-64 Details for qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_x86_64.whl
qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_aarch64.whl CPython 3.12 abi3 Linux musl 1.2+ ARM64 Details for qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_aarch64.whl
qweb_rs-0.1.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for qweb_rs-0.1.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
qweb_rs-0.1.2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for qweb_rs-0.1.2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
qweb_rs-0.1.2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for qweb_rs-0.1.2-cp312-abi3-macosx_11_0_arm64.whl
qweb_rs-0.1.2-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for qweb_rs-0.1.2-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 5.2 MB

Release files / qweb_rs-0.1.2.tar.gz

Download URL qweb_rs-0.1.2.tar.gz
Size 187.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54f0b90afb294e72638dc21506ab3872c8b7ce62e07ab5859fc735770e7c3c5a
BLAKE2b-256 checksum
How to use checksums
e73e2451eb52ef28c3fc2b7c911fe1123263508f080186d96ad127d617293e03
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-win_amd64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-win_amd64.whl
Size 594.2 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
98fbdccdb58273d8e3cb32e3a92de545dbb274e22cbd3e453cc9b48195b82332
BLAKE2b-256 checksum
How to use checksums
3cf7a15115e359c4e1f49dfe5cfeb613d60cfea44efcca08e9fa6b0b6e813cf7
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_x86_64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_x86_64.whl
Size 908.3 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
4cca0ff618e6108a009c7818850bc5468132f66d7bc7441f7256203f8f83c00a
BLAKE2b-256 checksum
How to use checksums
676d3dce98b0e5f4d2fee235fe53387540289f6b43784c0cb660c309ce908acb
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_aarch64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-musllinux_1_2_aarch64.whl
Size 853.8 kB
Tags CPython 3.12 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
61939c230a1a4fcca98586ad25293a193e62e3b61fc57e870bfc548142e63af9
BLAKE2b-256 checksum
How to use checksums
e01dd9ed2c931b4662468cd6a9c23bfadf79aca43f2d6d2a80e090384498f2fd
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 698.1 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8157cdbfb329ce8ad86bde380fc57b87723adc663fccbe1f8b8ba5aeb2b80a49
BLAKE2b-256 checksum
How to use checksums
18213ad5ca6d1599fde8488157768b6d515642fcbe7fe4fdb67fef60a0f9aeb6
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 674.9 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
a806dd1adc83da6bb590ff36bf0d04d0e7f73389a51f1e760a3e9aa9b376a085
BLAKE2b-256 checksum
How to use checksums
bc281980a76635a0b7805d13037472f9e28a181262d02fd738cf438093e637a2
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-macosx_11_0_arm64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-macosx_11_0_arm64.whl
Size 638.5 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5dc03b24671e9bf7e917ddc90b6de1807157c1782bc206ad6b46c31c4d1d3a33
BLAKE2b-256 checksum
How to use checksums
4ac75d6aaf16a919a9fae6a78392c8faba40784d4b8e71e1cc4aa558070ab83a
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 11, 2026.

Transparency log

Release files / qweb_rs-0.1.2-cp312-abi3-macosx_10_12_x86_64.whl

Download URL qweb_rs-0.1.2-cp312-abi3-macosx_10_12_x86_64.whl
Size 678.9 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c339ed3833b9857bf4b2ca1db2a24faa492ee7734f002276bd2ce96f04278864
BLAKE2b-256 checksum
How to use checksums
c70431b3956e6e6a0f950449a8d9381389939083b93d96dfcf9db3bf8d5e51ed
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 11, 2026.

Transparency log

Security for qweb-rs 0.1.2

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 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for qweb_rs-0.1.2.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 11, 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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

8 release files Full provenance

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