Skip to main content

Fast Web Push (VAPID + AES128GCM) for Python — Rust web-push crate behind a PyO3 binding

Project description

webpush-rs

Fast Web Push (VAPID + AES128GCM) for Python — the Rust web-push crate behind a PyO3 binding.

The VAPID JWT signing and payload encryption run in native Rust; Python sees a single blocking send_one. Compared to a pure-Python sender it roughly halves per-send CPU and adds no Python dependency footprint (the crypto is statically linked, not pulled in as cryptography/http-ece).

End-to-end latency is dominated by the network round-trip to the push service (FCM/Apple), so this is not "faster delivery" — it's lower CPU and memory on the sending host, which matters when fanning out to many subscribers.

Install

pip install webpush-rs        # or: uv pip install webpush-rs

Prebuilt wheels are published for CPython 3.8+ (abi3, one wheel per platform) on Linux (manylinux x86_64 + aarch64), macOS, and Windows.

Usage

import asyncio
import webpush_rs

# send_one is blocking (it drives a small internal Tokio runtime); call it off
# the event loop from async code.
status = await asyncio.to_thread(
    webpush_rs.send_one,
    endpoint,        # subscription.endpoint
    p256dh,          # subscription.keys.p256dh
    auth,            # subscription.keys.auth
    vapid_private,   # url-safe base64 VAPID private key
    "mailto:you@example.com",  # VAPID subject (mailto: or https URL)
    payload_bytes,   # the notification payload
)
# 201 = delivered; 404/410 = endpoint gone (delete the subscription); 0 = error (raises).

License

MIT OR Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webpush_rs-0.1.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

webpush_rs-0.1.1-cp38-abi3-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

webpush_rs-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

webpush_rs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

webpush_rs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file webpush_rs-0.1.1.tar.gz.

File metadata

  • Download URL: webpush_rs-0.1.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for webpush_rs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4064b44a3d155f9a13f9af2ab47d13b4a033bb0f2649fe0dc212a9122a379ae5
MD5 a77e9e9797b5a9c17b1db678a3cd8a8b
BLAKE2b-256 2bc8e66fc1d7a05bfa912b70d9873830647f92cbdf5947d23e0fe1cd30c1bf71

See more details on using hashes here.

Provenance

The following attestation bundles were made for webpush_rs-0.1.1.tar.gz:

Publisher: release.yml on coseto6125/webpush-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webpush_rs-0.1.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: webpush_rs-0.1.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for webpush_rs-0.1.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3be101567941252258284e0150cd6a6b2cf8f12acb824de3990bec226d0e87c2
MD5 ed77d3daa4430de575d09baea0b7b31d
BLAKE2b-256 0edcd05e326ee241880a16101e2218c4aa121614fa680c5def3fe372d5ce258d

See more details on using hashes here.

Provenance

The following attestation bundles were made for webpush_rs-0.1.1-cp38-abi3-win_amd64.whl:

Publisher: release.yml on coseto6125/webpush-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webpush_rs-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for webpush_rs-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b531aefc69d73ddd416408d6660795d590ea93ba9266ce5bf46ee8403c007b8d
MD5 3a1144e1e8c79c0abe210e40613efc91
BLAKE2b-256 2def15610f20a63e1decb916318a22fdf0967b63736b4ba28133b6a594387dde

See more details on using hashes here.

Provenance

The following attestation bundles were made for webpush_rs-0.1.1-cp38-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on coseto6125/webpush-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webpush_rs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webpush_rs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fac71278f7c3bb59c41e9737e025b45adfb7236e30d27222b29a221057e0d8bf
MD5 35b5170effa1452f5dd40f093b9c0227
BLAKE2b-256 9460880e6f305e7186a2a58568d91632a9d67d84271af6f7718c28d4a05d7a61

See more details on using hashes here.

Provenance

The following attestation bundles were made for webpush_rs-0.1.1-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on coseto6125/webpush-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webpush_rs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webpush_rs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5c529ea47451fb625c1b89aa35ef3aee1e68befca7387f4133ac3bf59d6cdae5
MD5 b329837d528509332859e7000d46b271
BLAKE2b-256 43b6309df37ea55a7cdd38d6342f5a487e3b2142810b26ff4f8667a008f1ba1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for webpush_rs-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on coseto6125/webpush-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page