Skip to main content

nat20-bridge

Nat20 over HTTP: a localhost REST API that puts the dnd5e-engine D&D 5e SRD 5.2 rules engine (backed by dnd5e-srd-data) behind a small FastAPI surface. Any client that speaks HTTP can roll dice, resolve checks and run a full fight with real rules. It is the backend of the SillyTavern nat20 extension.

The bridge binds to 127.0.0.1 by default — it is not intended to be exposed on the network. CORS is permissive because the SillyTavern browser page fetches it cross-origin from a loopback address.

Running

uvx nat20-bridge      # from PyPI
uv run nat20-bridge   # from a checkout of this repository

Options:

  • --host (default 127.0.0.1)
  • --port (default 8020)
  • --data-dir (default ~/.nat20-bridge) — where homebrew.json persists.
  • --max-combats (default 16) — how many combats stay live at once; starting one more ends the least recently used.

Development

uv sync --extra dev
make check

Metadata

Release files for nat20-bridge 0.8.1

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

Source distribution (sdist)

Source distribution for nat20-bridge 0.8.1
File Size Uploaded Provenance Actions
nat20_bridge-0.8.1.tar.gz 40.4 kB With provenance Details for nat20_bridge-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nat20-bridge 0.8.1
File Interpreter ABI Platform Actions
nat20_bridge-0.8.1-py3-none-any.whl Python 3 none any Details for nat20_bridge-0.8.1-py3-none-any.whl

Total release size: 65.0 kB

Release files / nat20_bridge-0.8.1.tar.gz

Download URL nat20_bridge-0.8.1.tar.gz
Size 40.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8f734ab27feb2a6973a4c989d24a9907afeb566a7c88b081c05842abab663cf0
BLAKE2b-256 checksum
How to use checksums
ed8a1eff2d1301335b39d45b5abe3af685f546c70cff72865444c029e8bbba01
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 27, 2026.

Transparency log

Release files / nat20_bridge-0.8.1-py3-none-any.whl

Download URL nat20_bridge-0.8.1-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5231f5d4d9cb163d56009c30a7f4230100424205fdfca37798e9a29e87506243
BLAKE2b-256 checksum
How to use checksums
636304ce1a9eaf5d0d76a890f6ce62b95e62a745f26429be582934e92f580e7a
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 27, 2026.

Transparency log

Security for nat20-bridge 0.8.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nat20_bridge-0.8.1.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 27, 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