fca_api.types.markets#

class fca_api.types.markets.RegulatedMarket(*, name: str, trading_name: ~typing.Annotated[str | None, ~pydantic.functional_validators.BeforeValidator(func=~fca_api.types.field_parsers.StrOrNone, json_schema_input_type=PydanticUndefined)], type: str, status: ~typing.Annotated[str, ~pydantic.types.StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None)], reference_number: ~typing.Annotated[str | None, ~pydantic.types.StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None), ~pydantic.functional_validators.BeforeValidator(func=~fca_api.types.field_parsers.StrOrNone, json_schema_input_type=PydanticUndefined)], firm_url: ~typing.Annotated[~pydantic.networks.HttpUrl | None, ~fca_api.types.annotations.FcaApiFieldInfo(marks=frozenset({<FcaApiField.InternalUrl: 'internal_url'>}))])[source]#

Details of a regulated market on the FCA register.

This model is used by high-level helpers such as Client.get_regulated_markets to provide a typed view over the regulated markets dataset.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_private__#

Values of private attributes set on the model instance.

__class_vars__ = {}#

The names of the class variables defined on the model.

__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'fca_api.types.markets.RegulatedMarket'>, 'config': {'title': 'RegulatedMarket'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'fca_api.types.markets.RegulatedMarket'>>]}, 'ref': 'fca_api.types.markets.RegulatedMarket:93917376701760', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'firm_url': {'metadata': {'pydantic_js_updates': {'description': "URL to the regulated market's firm details."}}, 'schema': {'schema': {'function': {'function': <function _BaseUrl.__get_pydantic_core_schema__.<locals>.wrap_val>, 'type': 'no-info'}, 'metadata': {'pydantic_js_functions': [<bound method _BaseUrl.__get_pydantic_json_schema__ of <class 'pydantic.networks.HttpUrl'>>]}, 'schema': {'allowed_schemes': ['http', 'https'], 'max_length': 2083, 'type': 'url'}, 'serialization': {'function': <bound method _BaseUrl.serialize_url of <class 'pydantic.networks.HttpUrl'>>, 'info_arg': True, 'type': 'function-plain'}, 'type': 'function-wrap'}, 'type': 'nullable'}, 'serialization_alias': 'firm_url', 'type': 'model-field', 'validation_alias': [['firmurl'], ['firm_url']]}, 'name': {'metadata': {'pydantic_js_updates': {'description': 'The name of the regulated market.'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'reference_number': {'metadata': {'pydantic_js_updates': {'description': 'The reference number of the regulated market.'}}, 'schema': {'function': {'function': <function StrOrNone>, 'type': 'no-info'}, 'schema': {'schema': {'strip_whitespace': True, 'to_upper': True, 'type': 'str'}, 'type': 'nullable'}, 'type': 'function-before'}, 'serialization_alias': 'reference_number', 'type': 'model-field', 'validation_alias': [['reference number'], ['reference_number']]}, 'status': {'metadata': {'pydantic_js_updates': {'description': 'The status of the regulated market.'}}, 'schema': {'strip_whitespace': True, 'to_upper': True, 'type': 'str'}, 'type': 'model-field'}, 'trading_name': {'metadata': {'pydantic_js_updates': {'description': 'The trading name of the regulated market.'}}, 'schema': {'function': {'function': <function StrOrNone>, 'type': 'no-info'}, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'function-before'}, 'serialization_alias': 'trading_name', 'type': 'model-field', 'validation_alias': [['tradingname'], ['trading_name']]}, 'type': {'metadata': {'pydantic_js_updates': {'description': 'The type of regulated market.'}}, 'schema': {'type': 'str'}, 'serialization_alias': 'type', 'type': 'model-field', 'validation_alias': [['type of business or individual'], ['type']]}}, 'model_name': 'RegulatedMarket', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'firm_url': FieldInfo(annotation=Union[HttpUrl, NoneType], required=True, alias_priority=2, validation_alias=AliasChoices(choices=['firmurl', 'firm_url']), serialization_alias='firm_url', description="URL to the regulated market's firm details.", metadata=[FcaApiFieldInfo(marks=frozenset({<FcaApiField.InternalUrl: 'internal_url'>}))]), 'name': FieldInfo(annotation=str, required=True, description='The name of the regulated market.'), 'reference_number': FieldInfo(annotation=Union[str, NoneType], required=True, alias_priority=2, validation_alias=AliasChoices(choices=['reference number', 'reference_number']), serialization_alias='reference_number', description='The reference number of the regulated market.', metadata=[StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None), BeforeValidator(func=<function StrOrNone>, json_schema_input_type=PydanticUndefined)]), 'status': FieldInfo(annotation=str, required=True, description='The status of the regulated market.', metadata=[StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None)]), 'trading_name': FieldInfo(annotation=Union[str, NoneType], required=True, alias_priority=2, validation_alias=AliasChoices(choices=['tradingname', 'trading_name']), serialization_alias='trading_name', description='The trading name of the regulated market.', metadata=[BeforeValidator(func=<function StrOrNone>, json_schema_input_type=PydanticUndefined)]), 'type': FieldInfo(annotation=str, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['type of business or individual', 'type']), serialization_alias='type', description='The type of regulated market.')}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x0000556ad7e06540,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x0000556ad7e06540,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x0000556ad7e06540,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "type": SerField {                                         key: "type",                                         alias: Some(                                             "type",                                         ),                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "trading_name": SerField {                                         key: "trading_name",                                         alias: Some(                                             "trading_name",                                         ),                                         serializer: Some(                                             Nullable(                                                 NullableSerializer {                                                     serializer: Str(                                                         StrSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "name": SerField {                                         key: "name",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "status": SerField {                                         key: "status",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "reference_number": SerField {                                         key: "reference_number",                                         alias: Some(                                             "reference_number",                                         ),                                         serializer: Some(                                             Nullable(                                                 NullableSerializer {                                                     serializer: Str(                                                         StrSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "firm_url": SerField {                                         key: "firm_url",                                         alias: Some(                                             "firm_url",                                         ),                                         serializer: Some(                                             Nullable(                                                 NullableSerializer {                                                     serializer: Function(                                                         FunctionPlainSerializer {                                                             func: Py(                                                                 0x00007fe7e403e380,                                                             ),                                                             name: "plain_function[serialize_url]",                                                             function_name: "serialize_url",                                                             return_serializer: Any(                                                                 AnySerializer,                                                             ),                                                             fallback_serializer: None,                                                             when_used: Always,                                                             is_field_serializer: false,                                                             info_arg: true,                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 6,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "RegulatedMarket",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="RegulatedMarket", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "name",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "name",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "trading_name",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "trading_name",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "tradingname",                                     ),                                     rest: [],                                 },                                 LookupPath {                                     first_item: PathItemString(                                         "trading_name",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: FunctionBefore(                             FunctionBeforeValidator {                                 validator: Nullable(                                     NullableValidator {                                         validator: Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         name: "nullable[str]",                                     },                                 ),                                 func: Py(                                     0x00007fe7e4053ec0,                                 ),                                 config: Py(                                     0x00007fe7e403f000,                                 ),                                 name: "function-before[StrOrNone(), nullable[str]]",                                 field_name: None,                                 info_arg: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "type",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "type of business or individual",                                     ),                                     rest: [],                                 },                                 LookupPath {                                     first_item: PathItemString(                                         "type",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "status",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "status",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: StrConstrained(                             StrConstrainedValidator {                                 strict: false,                                 pattern: None,                                 max_length: None,                                 min_length: None,                                 strip_whitespace: true,                                 to_lower: false,                                 to_upper: true,                                 coerce_numbers_to_str: false,                                 ascii_only: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "reference_number",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "reference_number",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "reference number",                                     ),                                     rest: [],                                 },                                 LookupPath {                                     first_item: PathItemString(                                         "reference_number",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: FunctionBefore(                             FunctionBeforeValidator {                                 validator: Nullable(                                     NullableValidator {                                         validator: StrConstrained(                                             StrConstrainedValidator {                                                 strict: false,                                                 pattern: None,                                                 max_length: None,                                                 min_length: None,                                                 strip_whitespace: true,                                                 to_lower: false,                                                 to_upper: true,                                                 coerce_numbers_to_str: false,                                                 ascii_only: false,                                             },                                         ),                                         name: "nullable[constrained-str]",                                     },                                 ),                                 func: Py(                                     0x00007fe7e4053ec0,                                 ),                                 config: Py(                                     0x00007fe7e403f000,                                 ),                                 name: "function-before[StrOrNone(), nullable[constrained-str]]",                                 field_name: None,                                 info_arg: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "firm_url",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "firm_url",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "firmurl",                                     ),                                     rest: [],                                 },                                 LookupPath {                                     first_item: PathItemString(                                         "firm_url",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: Nullable(                             NullableValidator {                                 validator: FunctionWrap(                                     FunctionWrapValidator {                                         validator: Url(                                             UrlValidator {                                                 strict: false,                                                 max_length: Some(                                                     2083,                                                 ),                                                 allowed_schemes: Some(                                                     (                                                         {                                                             "http",                                                             "https",                                                         },                                                         "'http' or 'https'",                                                     ),                                                 ),                                                 host_required: false,                                                 default_host: None,                                                 default_port: None,                                                 default_path: None,                                                 name: "url['http','https']",                                                 preserve_empty_path: false,                                             },                                         ),                                         func: Py(                                             0x00007fe7e3f5e7a0,                                         ),                                         config: Py(                                             0x00007fe7e403f000,                                         ),                                         name: "function-wrap[wrap_val()]",                                         field_name: None,                                         info_arg: false,                                         hide_input_in_errors: false,                                         validation_error_cause: false,                                     },                                 ),                                 name: "nullable[function-wrap[wrap_val()]]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "RegulatedMarket",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "trading_name",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 1,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "status",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "tradingname",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "reference number",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "firmurl",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 5,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "reference_number",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 1,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "type of business or individual",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "name",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 1,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "firm_url",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 5,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                                 LookupFieldInfo {                                     field_index: 5,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 1,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x0000556ad7e06540,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x00007fe7e4c7c550,         ),         name: "RegulatedMarket",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, name: str, trading_name: Annotated[Optional[str], BeforeValidator(func=<function StrOrNone>, json_schema_input_type=PydanticUndefined)], type: str, status: Annotated[str, StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None)], reference_number: Annotated[Optional[str], StringConstraints(strip_whitespace=True, to_upper=True, to_lower=None, strict=None, min_length=None, max_length=None, pattern=None, ascii_only=None), BeforeValidator(func=<function StrOrNone>, json_schema_input_type=PydanticUndefined)], firm_url: Annotated[Optional[pydantic.networks.HttpUrl], FcaApiFieldInfo(marks=frozenset({<FcaApiField.InternalUrl: 'internal_url'>}))]) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].