core.orm.types.uuid_type

Module Contents

Classes

UUID

The UUID type used throughout OneGov. The base is always the UUID type

class core.orm.types.uuid_type.UUID(as_uuid: bool = True)[source]

Bases: sqlalchemy.dialects.postgresql.UUID

The UUID type used throughout OneGov. The base is always the UUID type defined by SQLAlchemy for Postgres, but we change the default to actually handle the values as uuid.UUID values.

Another approach could be the following:

https://github.com/seantis/libres/blob/master/libres/db/models/types/uuid_type.py

We can switch to this any time.