Skip to main content

Flametrench v0.1 wire-format identifiers for Python: encode, decode, and generate prefixed UUIDv7 IDs.

Project description

flametrench-ids

CI

Python SDK for the Flametrench wire-format identifier specification.

Flametrench identifiers are stable, opaque strings of the form {type}_{32-hex}, where the hex payload is a UUIDv7 (so generated IDs sort by creation time). The same identifiers travel unchanged across Node, PHP, Python, and Java SDKs.

from flametrench_ids import generate, decode, is_valid, type_of

generate("usr")
# → 'usr_0190f2a81b3c7abc8123456789abcdef'

decode("usr_0190f2a81b3c7abc8123456789abcdef")
# → DecodedId(type='usr', uuid='0190f2a8-1b3c-7abc-8123-456789abcdef')

is_valid("usr_0190f2a81b3c7abc8123456789abcdef", "usr")  # → True
is_valid("usr_0190f2a81b3c7abc8123456789abcdef", "org")  # → False

type_of("usr_0190f2a81b3c7abc8123456789abcdef")  # → 'usr'

Installation

pip install flametrench-ids

Requires Python 3.11+. UUIDv7 generation uses uuid.uuid7() from the stdlib on Python 3.14+, falling back to the uuid7 package on 3.11–3.13. Both produce identical RFC 9562 v7 layouts; the conformance suite verifies this.

Registered type prefixes

Prefix Meaning Spec version
usr user v0.1
org organization v0.1
mem membership v0.1
inv invitation v0.1
ses session v0.1
cred credential v0.1
tup authorization tuple v0.1
mfa MFA factor v0.2
shr share token v0.2

The registry is normative; see docs/ids.md for the full rules.

Conformance

flametrench-ids runs the same fixture corpus that gates @flametrench/ids (Node) and flametrench/ids (PHP). All 48 MUST-level fixtures from spec/conformance/fixtures/ids/ pass on every release; the test suite vendors the fixtures and compares them to the upstream spec repo via CI.

# In a checked-out copy:
pytest

License

Apache-2.0. See LICENSE and NOTICE.

Copyright 2026 NDC Digital, LLC.

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

flametrench_ids-0.3.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

flametrench_ids-0.3.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file flametrench_ids-0.3.0.tar.gz.

File metadata

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

File hashes

Hashes for flametrench_ids-0.3.0.tar.gz
Algorithm Hash digest
SHA256 eed3d7204606d8b76537bb735fcf7b78bb6a9c301896b29e571e479f26fde15d
MD5 dd0377baace88bbfecf1569841a28955
BLAKE2b-256 db173158bd149b4e4beca32ecb90983c5e07514cddb2fe5f3facbf53ed194700

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_ids-0.3.0.tar.gz:

Publisher: publish.yml on flametrench/ids-python

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

File details

Details for the file flametrench_ids-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flametrench_ids-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7da1c217ac770a08be41316d846e3f70750dd61ed0379dbcafcaa547c24a0f5
MD5 1b9b79ba0aed8577beea9c5737479b92
BLAKE2b-256 bbe2d7c20853ef0581ba8c4052ea37680ac975cab782603867173070cdb0e919

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_ids-0.3.0-py3-none-any.whl:

Publisher: publish.yml on flametrench/ids-python

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