Provider

pydantic model Provider[source]

A provider.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Show JSON schema
{
   "title": "Provider",
   "description": "A provider.",
   "type": "object",
   "properties": {
      "code": {
         "description": "A locally unique code within the prefix for the provider",
         "title": "Code",
         "type": "string"
      },
      "name": {
         "description": "Name of the provider",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "Description of the provider",
         "title": "Description",
         "type": "string"
      },
      "homepage": {
         "description": "Homepage of the provider",
         "title": "Homepage",
         "type": "string"
      },
      "uri_format": {
         "description": "The URI format string, which must have at least one ``$1`` in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.",
         "title": "URI Format",
         "type": "string"
      }
   },
   "required": [
      "code",
      "name",
      "description",
      "homepage",
      "uri_format"
   ]
}

Fields:
field code: str [Required]

A locally unique code within the prefix for the provider

field description: str [Required]

Description of the provider

field homepage: str [Required]

Homepage of the provider

field name: str [Required]

Name of the provider

field uri_format: str [Required]

The URI format string, which must have at least one $1 in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.

resolve(identifier: str) str[source]

Resolve the identifier into a URI.

Parameters:

identifier – The identifier in the semantic space

Returns:

The URI for the identifier