angzarr_client.identity

Aggregate identity computation for Angzarr domains.

Provides deterministic UUID generation from business keys, ensuring consistent aggregate identification across services. Matches the Rust identity module.

Attributes

Functions

compute_root(→ uuid.UUID)

Compute a deterministic root UUID from domain and business key.

inventory_product_root(→ uuid.UUID)

Generate a deterministic UUID for an inventory product aggregate.

customer_root(→ uuid.UUID)

Compute a deterministic root UUID for a customer aggregate.

product_root(→ uuid.UUID)

Compute a deterministic root UUID for a product aggregate.

order_root(→ uuid.UUID)

Compute a deterministic root UUID for an order aggregate.

inventory_root(→ uuid.UUID)

Compute a deterministic root UUID for an inventory aggregate.

cart_root(→ uuid.UUID)

Compute a deterministic root UUID for a cart aggregate.

fulfillment_root(→ uuid.UUID)

Compute a deterministic root UUID for a fulfillment aggregate.

to_proto_bytes(→ bytes)

Convert a uuid.UUID to 16-byte proto representation.

Module Contents

angzarr_client.identity.INVENTORY_PRODUCT_NAMESPACE
angzarr_client.identity.compute_root(domain: str, business_key: str) uuid.UUID

Compute a deterministic root UUID from domain and business key.

The UUID is derived from: hash(“angzarr” + domain + business_key) using the OID namespace, matching the Rust compute_root function.

angzarr_client.identity.inventory_product_root(product_id: str) uuid.UUID

Generate a deterministic UUID for an inventory product aggregate.

Uses UUID v5 with INVENTORY_PRODUCT_NAMESPACE to ensure the same product_id always maps to the same inventory aggregate root.

angzarr_client.identity.customer_root(email: str) uuid.UUID

Compute a deterministic root UUID for a customer aggregate.

angzarr_client.identity.product_root(sku: str) uuid.UUID

Compute a deterministic root UUID for a product aggregate.

angzarr_client.identity.order_root(order_id: str) uuid.UUID

Compute a deterministic root UUID for an order aggregate.

angzarr_client.identity.inventory_root(product_id: str) uuid.UUID

Compute a deterministic root UUID for an inventory aggregate.

angzarr_client.identity.cart_root(customer_id: str) uuid.UUID

Compute a deterministic root UUID for a cart aggregate.

angzarr_client.identity.fulfillment_root(order_id: str) uuid.UUID

Compute a deterministic root UUID for a fulfillment aggregate.

angzarr_client.identity.to_proto_bytes(id: uuid.UUID) bytes

Convert a uuid.UUID to 16-byte proto representation.