ActivityId
yosoi.identities.ActivityId
class ActivityId(str):
Canonical random UUID v4 identity for one activity occurrence.
Parsing validates lowercase hyphenated RFC 4122 UUID v4 text in Rust; it does not establish that an activity exists in an archive. As a string value, the identity is immutable and can be serialized without native object state.
Source: python/yosoi/identities.py:13
Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.
Methods
Section titled “Methods”random
Section titled “random”@classmethod
def random(cls) -> Self:
Generate a fresh UUID v4 in Rust without creating an archived activity.
Source: python/yosoi/identities.py:33
from_str
Section titled “from_str”@classmethod
def from_str(cls, value: str) -> Self:
Parse canonical text using the subclass constructor’s validation.
Args: value: Lowercase hyphenated UUID v4 representation.
Returns: An immutable identity of the requested subclass.
Raises: RequestError: The text is invalid, noncanonical, or not RFC 4122 v4.
Source: python/yosoi/identities.py:38
as_bytes
Section titled “as_bytes”def as_bytes(self) -> bytes:
Return the 16 UUID bytes in network byte order as an owned value.