Skip to main content
Pre-release

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

Bessemer

Bessemer: Rust HTTP runtime with a Python API

Bessemer is a Rust HTTP runtime with a Python application API. This checkout contains the application runtime, process supervisor and the original M0 performance spike. The 1.0 line freezes the public API. Wheels are published for Linux x86_64 (CPython 3.12, 3.13, 3.14 and free-threaded 3.14t), macOS on Apple Silicon and Intel, and Windows x86_64 (CPython 3.12 and 3.13). Linux is the qualified production platform; the full specification and formal performance targets have not yet been met. See the changelog for what is covered.

Performance

In an eight-workload GCP benchmark, Bessemer at 678e318 was compared with RC10, FastAPI on Uvicorn with uvloop and httptools, and native Axum. The table shows median successful requests per second over HTTP/1.1 on four pinned cores of a C3 server with a separate load generator. The Python frameworks used standard CPython 3.14.7.

Workload Bessemer FastAPI Axum
Small JSON 251,045 43,090 248,065
20-item typed echo 146,892 25,564 86,202
1,000-item typed echo 6,519 1,944 4,713
256-model response 84,650 13,632 58,407

On one core, the small JSON and path/query routes ran 10.63–13.34× FastAPI's throughput across both Python modes.

On free-threaded CPython 3.14.7t, Bessemer gained 6.3% over the matched RC10 build on the 20-item echo and 9.8% on the 1,000-item echo at four cores. The larger echo's p99 latency rose from 4.65 ms to 5.39 ms. Across both Python modes, Bessemer and FastAPI handled inline Python checksums at similar rates and Axum ran the native checksum at roughly 10–11.5× Bessemer's throughput. On four cores, all four builds reached about 2.53 GiB/s on the 256 KiB download. GCP benchmark methodology and full results

Run an application

Build requirements: CPython 3.12, 3.13, 3.14 or free-threaded 3.14t and Rust 1.92 or newer. Supervised workers run on Linux, macOS and Windows; --max-rss is Linux-only. The strongest process cleanup guarantees are Linux-specific. From this repository:

python -m pip install .
bessemer run examples.basic:app --host 127.0.0.1 --port 8000
import asyncio
from bessemer import App

app = App()
app.health("/healthz")

@app.get("/items/{item_id}")
async def read_item(item_id: int, include_deleted: bool = False):
    await asyncio.sleep(0.001)
    return {"id": item_id, "include_deleted": include_deleted}

The server compiles route declarations at startup. Rust handles HTTP routing, scalar path/query parsing, JSON parsing and serialization, body limits, admission control and request deadlines. A persistent Python worker runs handlers and application lifespan on an asyncio event loop: by default Bessemer's own loop, written in Rust, on Linux and macOS, and asyncio's loop elsewhere (event_loop="asyncio" selects asyncio's loop everywhere). Sync handlers use a bounded thread pool. The API supports compiled dependencies, constrained inputs, explicit responses, response models, OpenAPI 3.1 and optional Pydantic 2.10.6+ validation. Native controls include API-key authentication, CORS, host/proxy checks, rate limits, protected metrics and redacted access logs.

bessemer routes examples.basic:app
bessemer run examples.basic:app --workers 2 --max-body-size 1048576 --max-in-flight 128 \
  --request-timeout 30 --graceful-timeout 30

Supported settings resolve from CLI flags, then BESSEMER_* environment variables, then [tool.bessemer] in pyproject.toml, then defaults. See production readiness for the supported surface, operational limits and remaining work. The original specification is preserved in the repository so it does not depend on a conversation remaining available.

Container and checks

docker build -t bessemer .
docker run --rm -p 127.0.0.1:8000:8000 bessemer

The example container runs as a non-root user and checks /healthz. Replace examples.basic:app with your application when building your deployment image. The supplied image uses Tini to forward termination signals and reap orphaned application descendants. Bessemer supervises its worker processes beneath it. See container deployment for the authenticated example, resource limits, read-only filesystem and recorded image qualification. TLS can be terminated natively with --tls-cert and --tls-key (rustls, TLS 1.3 minimum unless --tls-min 1.2), or at an ingress proxy. HTTP/2 is served alongside HTTP/1.1 by ALPN over TLS and by prior knowledge on plaintext. Use ingress for deployment access controls. The native transport also bounds connections, header-read time, header count/bytes and request-target size. The built-in supervisor starts fresh worker processes, monitors their event-loop heartbeats, restarts failed workers and enforces a hard shutdown deadline. Worker count defaults to the available cgroup CPU quota. Per-worker rate limits are process-local; protected metrics currently require --workers 1.

For development, install the qualified tools and optional validator, then run:

python -m pip install '.[dev,pydantic]'
BESSEMER_REQUIRE_NATIVE=1 ./scripts/check.sh

This runs Rust formatting, Clippy, Rust tests, Python API and real HTTP tests, benchmark harness tests, Ruff and shell syntax checks. CI builds and tests installed wheels on Linux with CPython 3.12/Pydantic 2.10.6, CPython 3.13 and 3.14 with current Pydantic v2, and free-threaded CPython 3.14t. scripts/security-check.sh audits the installed runtime and locked Rust graph using separately installed pinned scanner tools.

M0 performance spike

This repository contains the M0 throughput spike: compare an Axum JSON handler that stays in Rust with an immediately completing Python async handler driven by Rust through PyO3. Both use a single-threaded Tokio runtime, the same HTTP stack, response shape and Rust JSON serialisation.

For the M0 comparison, build on the server machine and start both modes on the same dedicated, pinned core. In this Linux example, replace 192.0.2.10 with the server's interface address. The two commands need separate terminals.

cargo build --release
taskset -c 2 target/release/bessemer-m0 rust 192.0.2.10:8000
taskset -c 2 target/release/bessemer-m0 python 192.0.2.10:8001

On a separate load-generator machine with Python and oha 1.16 or later:

python3 benchmarks/measure_m0.py http://192.0.2.10:8000/ http://192.0.2.10:8001/

The comparison warms each endpoint for 30 seconds, then alternates five 60-second HTTP/1.1 keep-alive runs. It verifies the endpoint modes and responses, rejects request failures and a spread over 3%, and reports the median Python/Rust ratio. Exit status 1 means the ratio is below the 40% stop threshold; status 2 means the measurement is invalid. The 60% Tier 1 target is reported separately.

For a quick local check, the paired runner starts each server in turn:

DURATION=1s CONNECTIONS=25 ./benchmarks/run_m0.sh

Local results and shorter --warmup, --duration or --runs settings are exploratory, not the acceptance gate. This spike excludes route compilation, dependencies, and the rest of the planned request pipeline. It does not yet measure the separate fixed-rate latency scenarios.

Licence

Bessemer is licensed under either of Apache License, Version 2.0 or MIT license, at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Bessemer, as defined in the Apache-2.0 licence, is dual licensed as above, without any additional terms or conditions.

Metadata

Release files for bessemer 1.0.0rc11

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

Source distribution (sdist)

Source distribution for bessemer 1.0.0rc11
File Size Uploaded Provenance Actions
bessemer-1.0.0rc11.tar.gz 3.1 MB With provenance Details for bessemer-1.0.0rc11.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for bessemer 1.0.0rc11
File Actions
bessemer-1.0.0rc11-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details for bessemer-1.0.0rc11-cp314-cp314t-manylinux_2_28_x86_64.whl
bessemer-1.0.0rc11-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for bessemer-1.0.0rc11-cp314-cp314-manylinux_2_28_x86_64.whl
bessemer-1.0.0rc11-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for bessemer-1.0.0rc11-cp313-cp313-win_amd64.whl
bessemer-1.0.0rc11-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for bessemer-1.0.0rc11-cp313-cp313-manylinux_2_28_x86_64.whl
bessemer-1.0.0rc11-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for bessemer-1.0.0rc11-cp313-cp313-macosx_11_0_arm64.whl
bessemer-1.0.0rc11-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details for bessemer-1.0.0rc11-cp313-cp313-macosx_10_12_x86_64.whl
bessemer-1.0.0rc11-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for bessemer-1.0.0rc11-cp312-cp312-win_amd64.whl
bessemer-1.0.0rc11-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for bessemer-1.0.0rc11-cp312-cp312-manylinux_2_28_x86_64.whl
bessemer-1.0.0rc11-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for bessemer-1.0.0rc11-cp312-cp312-macosx_11_0_arm64.whl
bessemer-1.0.0rc11-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details for bessemer-1.0.0rc11-cp312-cp312-macosx_10_12_x86_64.whl

Total release size: 42.1 MB

Release files / bessemer-1.0.0rc11.tar.gz

Download URL bessemer-1.0.0rc11.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
22c1553c45fdb75d332f0f73fdd35bedbf25699dd5f3effbad2569e85de537ba
BLAKE2b-256 checksum
How to use checksums
2abf5106ad8dd383f85594d92704aa4d750495236cc6050dda0fd6aa1dc6e867
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL bessemer-1.0.0rc11-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c6848742aa96ec9d52963e92dbd188f8d19dbcf9a500d5d0ecf1be33f46750e9
BLAKE2b-256 checksum
How to use checksums
390f7053a914294c1f690dcf9984c2a6a2a8ec2b1f63d746f2e3e830aa85adce
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL bessemer-1.0.0rc11-cp314-cp314-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c9dd0ececcadbceb1688b3e126029b323cc482cf1bc31904220f9fa19bbd3be3
BLAKE2b-256 checksum
How to use checksums
222a72c22399d140af8ac9e17182815fecd65b91449237f0133ef5485e9f544a
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp313-cp313-win_amd64.whl

Download URL bessemer-1.0.0rc11-cp313-cp313-win_amd64.whl
Size 3.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e8a657210650cb968e92862cc4340131c3c78b1e7350e2c830d06aecf141667d
BLAKE2b-256 checksum
How to use checksums
63945aab3dc7e22c513313663c55b2bb1572ffd822b833929fba8bb5d1cb206e
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL bessemer-1.0.0rc11-cp313-cp313-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7b2bee76055c457229afbe049c2716db1989243131b53b9b00a4eef90bc2be25
BLAKE2b-256 checksum
How to use checksums
cd48e568f2e3c9fe5d627f576a7ce3fe053b48ef96209e00f17c9e8380bcc5c7
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp313-cp313-macosx_11_0_arm64.whl

Download URL bessemer-1.0.0rc11-cp313-cp313-macosx_11_0_arm64.whl
Size 3.7 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b2c2a19c5af8ac6bbdf802701fb937c0dc3a967bf83bf8556cdf65f8d5997186
BLAKE2b-256 checksum
How to use checksums
6abd6f884b9ef0826cea7f73f9871ca535ea4a179fc4a01080eca70917937243
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp313-cp313-macosx_10_12_x86_64.whl

Download URL bessemer-1.0.0rc11-cp313-cp313-macosx_10_12_x86_64.whl
Size 3.9 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b9a668fce45f3f2cb7f57b0f90daddca2f053e54f5de3956428b0b9b8db6afa3
BLAKE2b-256 checksum
How to use checksums
41bd86643cfa25647eb1978dd886b932fbfa02cc9ccb0867f506dd94e3c10fee
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp312-cp312-win_amd64.whl

Download URL bessemer-1.0.0rc11-cp312-cp312-win_amd64.whl
Size 3.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
47128a4c97d4004f5fa862131787f4de3cb6cc36f16ff920284268dc02ed6b9b
BLAKE2b-256 checksum
How to use checksums
221e1c88b2b0e880cb02a6dc3b6a6594fc113b4c3b2912418f8503234986f0fd
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL bessemer-1.0.0rc11-cp312-cp312-manylinux_2_28_x86_64.whl
Size 4.0 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e8c3f42c1d6e9336372b40cdf09aacd5188052fda2bf3787afd074668243e0dc
BLAKE2b-256 checksum
How to use checksums
cd74b241a38155def144b9d3842b84ccb768984b112d06d9723492a69cffef4d
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp312-cp312-macosx_11_0_arm64.whl

Download URL bessemer-1.0.0rc11-cp312-cp312-macosx_11_0_arm64.whl
Size 3.7 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6c7ca4badb973fc0c9541c0c24eed7bc1a725884345813cd38b701e33435ff7d
BLAKE2b-256 checksum
How to use checksums
e767e947e9244a2c82e87a87bf560ceb7f6cc24350eb94b9f2726b29e98be318
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 30, 2026.

Transparency log

Release files / bessemer-1.0.0rc11-cp312-cp312-macosx_10_12_x86_64.whl

Download URL bessemer-1.0.0rc11-cp312-cp312-macosx_10_12_x86_64.whl
Size 3.9 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ff773fbf91cfecac74c3f55efbc12ed6a2699ee8a7317023a73152a53375e1f3
BLAKE2b-256 checksum
How to use checksums
b8f5ab1bb556520a43b29c52f71a269bcb298c900d181d25225f2c1907511264
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 30, 2026.

Transparency log

Security for bessemer 1.0.0rc11

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

Select from 11 files

Attestation for bessemer-1.0.0rc11.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 30, 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