Skip to main content

loom-engine (Python)

The Python surface of loom-engine - a deterministic rules core for AI-run tabletop and RPG games.

pip install loom-engine-rpg   # the bare 'loom-engine' name is taken on PyPI
import loom_engine            # the import name is loom_engine

The design principle: the engine is truth. Dice, action economy, initiative, range, conditions, reactions, and validation are resolved by pure, replay-safe code. An AI narrator can describe the outcome, but it never gets to invent the roll, change the numbers, or rewrite what happened.

This package is a byte-parity port of the TypeScript engine: the same inputs produce identical results in Python (your server/backend) and TypeScript (the browser), so a server-authoritative resolution and a client one can never disagree. That parity is enforced by a shared cross-language golden-vector suite.

Modules (v2.3.0)

  • loom_engine.range_bands - grid-free Engaged/Near/Far positioning.
  • loom_engine.reaction_economy - the per-round "1 reaction per combatant" ceiling.
  • loom_engine.narration_contract - find_invented_number: reject prose that states a mechanics number the engine never produced (numerals and number-words).
  • loom_engine.ruleset - 5e + PF2e action economy, initiative ordering, conditions.

Pure stdlib, zero runtime dependencies. Compatible with the D&D 5e SRD (CC-BY-4.0) and the Pathfinder 2e Remaster ruleset (ORC License); see ../NOTICE.md. Not affiliated with or endorsed by Wizards of the Coast or Paizo.

Determinism

These modules use ordered dicts + explicit sorts for all logic (never hash() ordering). For any cross-language hashing, serialize with json.dumps(obj, sort_keys=True, separators=(',', ':')) and run with PYTHONHASHSEED=0. Floats are banned in deterministic paths.

Metadata

Release files for loom-engine-rpg 3.1.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 loom-engine-rpg 3.1.1
File Size Uploaded Provenance Actions
loom_engine_rpg-3.1.1.tar.gz 96.7 kB With provenance Details for loom_engine_rpg-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loom-engine-rpg 3.1.1
File Interpreter ABI Platform Actions
loom_engine_rpg-3.1.1-py3-none-any.whl Python 3 none any Details for loom_engine_rpg-3.1.1-py3-none-any.whl

Total release size: 162.6 kB

Release files / loom_engine_rpg-3.1.1.tar.gz

Download URL loom_engine_rpg-3.1.1.tar.gz
Size 96.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f4bb494903602bf4ab4b7bc1a817df74b764c64eafee0b131adce14b4bd4621c
BLAKE2b-256 checksum
How to use checksums
2dfb281663d2ad65d144c98721c3a95e8ae2a75ff61e1429a12b7f4c453170db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 12, 2026.

Transparency log

Release files / loom_engine_rpg-3.1.1-py3-none-any.whl

Download URL loom_engine_rpg-3.1.1-py3-none-any.whl
Size 65.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37737dea60fc8afedd5ba2c5843a0d774fc25018ac6a50372b0047b214fee24b
BLAKE2b-256 checksum
How to use checksums
538cfd5d02b5542bdb8f8e25e6db522039380ef0d48acb00d55b544ae4a17b7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 12, 2026.

Transparency log

Security for loom-engine-rpg 3.1.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 loom_engine_rpg-3.1.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 Jun 12, 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

3.1.1 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