cadrumo.core.registry_token module

Opaque text tokens whose membership a registry projection establishes.

A registry-projected vocabulary carries no closed Python member list: the dated registry owns which tokens exist and what they mean. These bases hold only the structural contract every such token shares, so a vocabulary type declares its docstring and nothing else unless its diagnostics or boundary differ.

class RegistryToken(value, *, _registry_validated=False)[source]

Bases: str

Text token constructible only at a registry projection boundary.

Parameters:
  • value (str)

  • _registry_validated (bool)

Return type:

Self

classmethod from_registry(value)[source]

Construct the typed value from its canonical registry token.

Return type:

Self

Parameters:

value (str)

property value: str

Return the canonical registry token text.

class StrictRegistryToken(value, *, _registry_validated=False)[source]

Bases: RegistryToken

Registry token a typed model accepts only once it has been projected.

Parameters:
  • value (str)

  • _registry_validated (bool)

Return type:

Self

property name: str

Return the canonical registry token for diagnostics.

class TextProjectedRegistryToken(value, *, _registry_validated=False)[source]

Bases: RegistryToken

Registry token a typed model projects from its non-empty text form.

Parameters:
  • value (str)

  • _registry_validated (bool)

Return type:

Self