Flametrench v0.1 wire-format identifiers for Python: encode, decode, and generate prefixed UUIDv7 IDs.
Project description
flametrench-ids
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eed3d7204606d8b76537bb735fcf7b78bb6a9c301896b29e571e479f26fde15d
|
|
| MD5 |
dd0377baace88bbfecf1569841a28955
|
|
| BLAKE2b-256 |
db173158bd149b4e4beca32ecb90983c5e07514cddb2fe5f3facbf53ed194700
|
Provenance
The following attestation bundles were made for flametrench_ids-0.3.0.tar.gz:
Publisher:
publish.yml on flametrench/ids-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flametrench_ids-0.3.0.tar.gz -
Subject digest:
eed3d7204606d8b76537bb735fcf7b78bb6a9c301896b29e571e479f26fde15d - Sigstore transparency entry: 1749357039
- Sigstore integration time:
-
Permalink:
flametrench/ids-python@122d65f85b44d15933f23508ae8a743933fd86f7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flametrench
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@122d65f85b44d15933f23508ae8a743933fd86f7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file flametrench_ids-0.3.0-py3-none-any.whl.
File metadata
- Download URL: flametrench_ids-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7da1c217ac770a08be41316d846e3f70750dd61ed0379dbcafcaa547c24a0f5
|
|
| MD5 |
1b9b79ba0aed8577beea9c5737479b92
|
|
| BLAKE2b-256 |
bbe2d7c20853ef0581ba8c4052ea37680ac975cab782603867173070cdb0e919
|
Provenance
The following attestation bundles were made for flametrench_ids-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on flametrench/ids-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flametrench_ids-0.3.0-py3-none-any.whl -
Subject digest:
a7da1c217ac770a08be41316d846e3f70750dd61ed0379dbcafcaa547c24a0f5 - Sigstore transparency entry: 1749357624
- Sigstore integration time:
-
Permalink:
flametrench/ids-python@122d65f85b44d15933f23508ae8a743933fd86f7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flametrench
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@122d65f85b44d15933f23508ae8a743933fd86f7 -
Trigger Event:
workflow_dispatch
-
Statement type: