Skip to main content

pitbull

pitbull lets ordinary, JavaScript-free HTML talk to Python while rendered in PyQt5 WebEngine (Chromium). It maps normal relative links and GET form submissions to Python functions in-process: no localhost server, browser automation driver, JavaScript, or custom URL syntax in your HTML.

Install

pip install pitbull

PyQt5 WebEngine is installed automatically as a package dependency.

Example

from pathlib import Path
from pitbull import App

app = App(Path("web"), title="Hello")

@app.event("greet")
def greet(request):
    name = request.form.get("name", "friend")
    return app.render("index.html", message=f"Hello, {name}!")

app.run()

web/index.html needs no JavaScript:

<!doctype html>
<title>Hello</title>
<form action="/greet" method="get">
  <label>Name <input name="name" required></label>
  <button>Greet</button>
</form>
<p>{{ message }}</p>

Security model

Pitbull has no listening socket. It creates an internal renderer-only URL scheme and restricts static files to web_root. Templates escape values supplied to app.render; do not put untrusted input directly into raw HTML strings returned from a handler.

Plain HTML constraint

Use ordinary relative links and GET forms. For example, action="/greet" calls @app.event("greet"), and href="/settings.html" opens a file in web_root. PyQt5 does not reliably expose POST form bodies through its navigation callback, so use method="get" for Python events. No pitbull:// URL needs to appear in authored HTML.

Scope

JavaScript is disabled through Chromium's managed content setting. This does not produce a custom Chromium binary with V8 physically removed. Building and maintaining such a browser is a separate Chromium-fork project, not something a normal PyPI wheel can safely distribute.

Metadata

Release files for pitbull 0.2.0

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

Source distribution (sdist)

Source distribution for pitbull 0.2.0
File Size Uploaded Provenance
pitbull-0.2.0.tar.gz 8.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pitbull 0.2.0
File Interpreter ABI Platform
pitbull-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / pitbull-0.2.0.tar.gz

Download URL pitbull-0.2.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
78d4e3d5c286fc625fca854959a0f4d3c6838eebbc5d93eb88089d2fe65c7041
BLAKE2b-256 checksum
How to use checksums
def1693c218e872eb8d8d5dc49b9d1b7815c49f404e24a4cc8c4597318275c2c
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 Oct 24, 2026.

Transparency log

Release files / pitbull-0.2.0-py3-none-any.whl

Download URL pitbull-0.2.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fecb8ca1300d81bdad9ad9939ffedd3b008262d3487fe98126dc23bbc20513f
BLAKE2b-256 checksum
How to use checksums
95edda2e87e6f78e3c4ddd18994444354ac8df5548d8034f7732d957b899510e
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 Oct 24, 2026.

Transparency log

Security for pitbull 0.2.0

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 pitbull-0.2.0.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 Oct 24, 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.2.0 This release

2 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