PydanticStringPrimitive#

class openstef_core.base_model.PydanticStringPrimitive[source]#

Bases: object

Base class for Pydantic-compatible types with string serialization.

__str__() str[source]#

Convert to string representation.

Return type:

str

classmethod from_string(s: str) Self[source]#

Create an instance from string representation.

Parameters:

s (str)

Return type:

Self

classmethod validate(v: Any, _info: Any = None) Self[source]#

Validate and convert input to this type.

Parameters:
  • v (Any) – Input value to validate.

  • _info (Any) – Additional validation info (unused).

  • v

  • _info

Returns:

Validated instance of this type.

Raises:

ValueError – If input cannot be converted to this type.

Return type:

Self

classmethod __get_pydantic_core_schema__(_source_type: type[Any], _handler: GetCoreSchemaHandler) InvalidSchema | AnySchema | NoneSchema | BoolSchema | IntSchema | FloatSchema | DecimalSchema | StringSchema | BytesSchema | DateSchema | TimeSchema | DatetimeSchema | TimedeltaSchema | LiteralSchema | MissingSentinelSchema | EnumSchema | IsInstanceSchema | IsSubclassSchema | CallableSchema | ListSchema | TupleSchema | SetSchema | FrozenSetSchema | GeneratorSchema | DictSchema | AfterValidatorFunctionSchema | BeforeValidatorFunctionSchema | WrapValidatorFunctionSchema | PlainValidatorFunctionSchema | WithDefaultSchema | NullableSchema | UnionSchema | TaggedUnionSchema | ChainSchema | LaxOrStrictSchema | JsonOrPythonSchema | TypedDictSchema | ModelFieldsSchema | ModelSchema | DataclassArgsSchema | DataclassSchema | ArgumentsSchema | ArgumentsV3Schema | CallSchema | CustomErrorSchema | JsonSchema | UrlSchema | MultiHostUrlSchema | DefinitionsSchema | DefinitionReferenceSchema | UuidSchema | ComplexSchema[source]#

Define Pydantic validation and serialization behavior.

Returns:

Core schema for Pydantic validation and serialization.

Parameters:
  • _source_type (type[Any])

  • _handler (GetCoreSchemaHandler)

Return type:

Union[InvalidSchema, AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, MissingSentinelSchema, EnumSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TupleSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, ArgumentsV3Schema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema, ComplexSchema]

__eq__(other: object) bool[source]#

Check equality based on string representation.

Returns:

True if both objects have the same string representation, False otherwise.

Parameters:

other (object)

Return type:

bool

__hash__() int[source]#

Return hash based on string representation.

Return type:

int