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.4.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.4.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flametrench_ids-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 b5866b178e5f77129538f96b663a07e20f63f4a8a4751420ebd541ece46aa446
MD5 663e2d12740ec80c3eb818d9aa393066
BLAKE2b-256 fff437e4be4316c63f8f9cfd28f2eb4840e41b610f86fe7bd38d94ec61038644

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_ids-0.4.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flametrench_ids-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a7a63c3c835558e0fd78510d2bc1068f4c6f72505485a4b4609d11c712323db
MD5 c58c975b301fb9119a2eda00a65094cc
BLAKE2b-256 974855fe011ede9c64bd765c13b782ff902e6f79c61e42e9e985663f1f8d2853

See more details on using hashes here.

Provenance

The following attestation bundles were made for flametrench_ids-0.4.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