NormalizedNamedReference

pydantic model NormalizedNamedReference[source]

Extends curies.NamedReference to normalize the prefix against the Bioregistry.

>>> NormalizedNamedReference(prefix="go", identifier="0032571", name="response to vitamin K")
NormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')

Standardizes capitalization to lowercase:

>>> NormalizedNamedReference(prefix="GO", identifier="0032571", name="response to vitamin K")
NormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')

Standardizes prefix synonyms to lowercase:

>>> NormalizedNamedReference(prefix="GOBP", identifier="0032571", name="response to vitamin K")
NormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')

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.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "NormalizedNamedReference",
   "description": "Extends :class:`curies.NamedReference` to normalize the prefix against the Bioregistry.\n\n>>> NormalizedNamedReference(prefix=\"go\", identifier=\"0032571\", name=\"response to vitamin K\")\nNormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')\n\nStandardizes capitalization to lowercase:\n\n>>> NormalizedNamedReference(prefix=\"GO\", identifier=\"0032571\", name=\"response to vitamin K\")\nNormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')\n\nStandardizes prefix synonyms to lowercase:\n\n>>> NormalizedNamedReference(prefix=\"GOBP\", identifier=\"0032571\", name=\"response to vitamin K\")\nNormalizedNamedReference(prefix='go', identifier='0032571', name='response to vitamin K')",
   "type": "object",
   "properties": {
      "prefix": {
         "description": "The prefix used in a compact URI (CURIE).",
         "title": "Prefix",
         "type": "string"
      },
      "identifier": {
         "description": "The local unique identifier used in a compact URI (CURIE).",
         "title": "Identifier",
         "type": "string"
      },
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the entity referenced by this object's prefix and identifier, if exists.",
         "title": "Name"
      }
   },
   "required": [
      "prefix",
      "identifier"
   ]
}

Config:
  • frozen: bool = True

Fields:

Validators: