This module contains extra API models that are not part of the official API specification.
However, this module may still assist in the construction of valid requests to the API, primarily
by providing additional type hints for the request and response payloads and validation.
UUID_Identifier
Bases: RootModel[UUID]
Represents a UUID type identifier used by the API.
Source code in horde_sdk/ai_horde_api/fields.py
| class UUID_Identifier(RootModel[uuid.UUID]):
"""Represents a UUID type identifier used by the API."""
model_config: ClassVar[ConfigDict] = {"frozen": True}
root: uuid.UUID
"""The underlying UUID object."""
@model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
@field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
@override
def __repr__(self) -> str:
return self.__str__()
@override
def __str__(self) -> str:
return self.root.__str__()
@override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
@override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
GenerationID
Bases: UUID_Identifier
Represents the ID of a generation job. Instances of this class can be compared with a str or a UUID object.
Source code in horde_sdk/ai_horde_api/fields.py
| class GenerationID(UUID_Identifier):
"""Represents the ID of a generation job. Instances of this class can be compared with a `str` or a UUID object."""
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
WorkerID
Bases: UUID_Identifier
Represents the ID of a worker. Instances of this class can be compared with a str or a UUID object.
Source code in horde_sdk/ai_horde_api/fields.py
| class WorkerID(UUID_Identifier):
"""Represents the ID of a worker. Instances of this class can be compared with a `str` or a UUID object."""
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
ImageID
Bases: UUID_Identifier
Represents the ID of an image. Instances of this class can be compared with a str or a UUID object.
Source code in horde_sdk/ai_horde_api/fields.py
| class ImageID(UUID_Identifier):
"""Represents the ID of an image. Instances of this class can be compared with a `str` or a UUID object."""
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
TeamID
Bases: UUID_Identifier
Represents the ID of a team. Instances of this class can be compared with a str or a UUID object.
Source code in horde_sdk/ai_horde_api/fields.py
| class TeamID(UUID_Identifier):
"""Represents the ID of a team. Instances of this class can be compared with a `str` or a UUID object."""
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|
SharedKeyID
Bases: UUID_Identifier
Represents the ID of a shared key. Instances of this class can be compared with a str or a UUID object.
Source code in horde_sdk/ai_horde_api/fields.py
| class SharedKeyID(UUID_Identifier):
"""Represents the ID of a shared key. Instances of this class can be compared with a `str` or a UUID object."""
|
model_config
class-attribute
model_config: ConfigDict = {'frozen': True}
root
instance-attribute
The underlying UUID object.
ser_model
Serialize the model to a string.
Source code in horde_sdk/ai_horde_api/fields.py
| @model_serializer
def ser_model(self) -> str:
"""Serialize the model to a string."""
return str(self.root)
|
id_must_be_uuid
id_must_be_uuid(v: str | UUID) -> str | uuid.UUID
Ensure that the ID is a valid UUID.
Source code in horde_sdk/ai_horde_api/fields.py
| @field_validator("root", mode="after")
def id_must_be_uuid(cls, v: str | uuid.UUID) -> str | uuid.UUID:
"""Ensure that the ID is a valid UUID."""
if isinstance(v, uuid.UUID):
return v
if v == "": # FIXME? This is a workaround for the swagger doc having `""`
logger.trace("Empty UUID string being converted to 0")
return uuid.UUID(int=0)
try:
return uuid.UUID(v, version=4)
except ValueError as e:
raise ValueError(f"Invalid UUID {v}") from e
|
__repr__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __repr__(self) -> str:
return self.__str__()
|
__str__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __str__(self) -> str:
return self.root.__str__()
|
__eq__
__eq__(other: Any) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __eq__(self, other: Any) -> bool:
if other is None or (
not (isinstance(self.__class__, uuid.UUID) or isinstance(other, uuid.UUID))
and self.__class__ != other.__class__
):
logger.debug(f"Comparing {self.root.__class__} with {other.__class__}")
if isinstance(other, UUID_Identifier):
return self.root == other.root
if isinstance(other, str):
return str(self.root) == other
if isinstance(other, uuid.UUID):
return self.root == other
return NotImplemented
|
__hash__
Source code in horde_sdk/ai_horde_api/fields.py
| @override
def __hash__(self) -> int:
return hash(UUID_Identifier.__name__) + self.root.__hash__()
|
__lt__
__lt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __lt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root < other.root
if isinstance(other, str):
return self.root < uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root < other
return NotImplemented
|
__gt__
__gt__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __gt__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root > other.root
if isinstance(other, str):
return self.root > uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root > other
return NotImplemented
|
__le__
__le__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __le__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root <= other.root
if isinstance(other, str):
return self.root <= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root <= other
return NotImplemented
|
__ge__
__ge__(other: object) -> bool
Source code in horde_sdk/ai_horde_api/fields.py
| def __ge__(self, other: object) -> bool:
if isinstance(other, UUID_Identifier):
return self.root >= other.root
if isinstance(other, str):
return self.root >= uuid.UUID(other)
if isinstance(other, uuid.UUID):
return self.root >= other
return NotImplemented
|