Registry

pydantic model Registry[source]

Metadata about a registry.

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": "Registry",
   "description": "Metadata about a registry.",
   "type": "object",
   "properties": {
      "prefix": {
         "description": "The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is `miriam`.",
         "title": "Prefix",
         "type": "string"
      },
      "name": {
         "description": "The human-readable label for the registry",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "description": "A full description of the registry.",
         "title": "Description",
         "type": "string"
      },
      "homepage": {
         "description": "The URL for the homepage of the registry.",
         "title": "Homepage",
         "type": "string"
      },
      "example": {
         "description": "An example prefix inside the registry.",
         "title": "Example",
         "type": "string"
      },
      "bibtex": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Citation key used in BibTex for this registry.",
         "title": "Bibtex"
      },
      "availability": {
         "$ref": "#/$defs/RegistrySchema",
         "description": "A structured description of the metadata that the registry collects"
      },
      "qualities": {
         "$ref": "#/$defs/RegistryQualities",
         "description": "A structured description of the registry's qualities"
      },
      "governance": {
         "$ref": "#/$defs/RegistryGovernance",
         "description": "A structured description of the governance for the registry"
      },
      "download": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A download link for the data contained in the registry",
         "title": "Download"
      },
      "provider_uri_format": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A URL with a $1 for a prefix to resolve in the registry",
         "title": "Provider Uri Format"
      },
      "search_uri_format": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A URL with a $1 for a prefix or string for searching for prefixes",
         "title": "Search Uri Format"
      },
      "resolver_uri_format": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A URL with a $1 for a prefix and $2 for an identifier to resolve in the registry",
         "title": "Resolver Uri Format"
      },
      "resolver_type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "An optional type annotation for what kind of resolver it is (i.e., redirect or lookup)",
         "title": "Resolver Type"
      },
      "contact": {
         "$ref": "#/$defs/Attributable",
         "description": "The contact for the registry."
      },
      "bioregistry_prefix": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The prefix for this registry in the Bioregistry",
         "title": "Bioregistry Prefix"
      },
      "logo_url": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The URL for the logo of the resource",
         "title": "Logo Url"
      },
      "license": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The license under which the resource is redistributed",
         "title": "License"
      },
      "short_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "A short name for the resource, e.g., for use in charts",
         "title": "Short Name"
      }
   },
   "$defs": {
      "Attributable": {
         "description": "An upper-level metadata for a researcher.",
         "properties": {
            "name": {
               "description": "The full name of the researcher",
               "title": "Name",
               "type": "string"
            },
            "orcid": {
               "anyOf": [
                  {
                     "pattern": "^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "title": "Open Researcher and Contributor Identifier"
            },
            "email": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The email address specific to the researcher.",
               "title": "Email address"
            },
            "github": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "title": "GitHub handle"
            }
         },
         "required": [
            "name"
         ],
         "title": "Attributable",
         "type": "object"
      },
      "RegistryGovernance": {
         "description": "Metadata about a registry's governance.",
         "properties": {
            "curation": {
               "enum": [
                  "private",
                  "import",
                  "community",
                  "opaque-review",
                  "open-review"
               ],
               "title": "Curation",
               "type": "string"
            },
            "curates": {
               "description": "This field denotes if the registry's maintainers and potentially contributors curate novel prefixes.",
               "title": "Curates",
               "type": "boolean"
            },
            "imports": {
               "description": "This field denotes if the registry imports and aligns prefixes from other registries.",
               "title": "Imports",
               "type": "boolean"
            },
            "scope": {
               "description": "This field denotes the scope of prefixes which the registry covers. For example, some registries are limited to ontologies, some have a full scope over the life sciences, and some are general purpose.",
               "title": "Scope",
               "type": "string"
            },
            "comments": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional additional comments about the registry's governance model",
               "title": "Comments"
            },
            "accepts_external_contributions": {
               "description": "This field denotes if the registry (in theory) accepts external contributions, either via suggestion or proactive improvement. This field does not pass judgement on the difficult of this process from the perspective of the submitter nor the responsiveness of the registry. This field does not consider the ability for insiders (i.e., people with private relationships to the maintainers) to affect change.",
               "title": "Accepts External Contributions",
               "type": "boolean"
            },
            "public_version_controlled_data": {
               "description": "This field denotes if the registry stores its data in publicly available version control system, such as GitHub or GitLab",
               "title": "Public Version-Controlled Data",
               "type": "boolean"
            },
            "data_repository": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "This field denotes the address of the registry's data version control repository.",
               "title": "Data Repository"
            },
            "code_repository": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "This field denotes the address of the registry's code version control repository.",
               "title": "Code Repository"
            },
            "review_team": {
               "description": "This field denotes if the registry's reviewers/moderators for external contributions known? If there's a well-defined, maintained listing, then it can be marked as public. If it can be inferred, e.g. from reading the commit history on a version control system, then it can be marked as inferrable. A closed review team, e.g., like for Identifiers.org can be marked as private. Resources that do not accept external contributions can be marked with N/A. An unmoderated regitry like Prefix.cc is marked with  'democratic'.",
               "enum": [
                  "public",
                  "inferrable",
                  "private",
                  "democratic",
                  "n/a"
               ],
               "title": "Review Team",
               "type": "string"
            },
            "status": {
               "description": "This field denotes the maitenance status of the repository. An active repository is still being maintained and also is responsive to external requests for improvement. An unresponsive repository is still being maintained in some capacity but is not responsive to external requests for improvement. An inactive repository is no longer being proactively maintained (though may receive occasional patches).",
               "enum": [
                  "active",
                  "unresponsive",
                  "inactive"
               ],
               "title": "Status",
               "type": "string"
            },
            "issue_tracker": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "This field denotes the public issue tracker for issues related to the code and data of the repository.",
               "title": "Issue Tracker"
            }
         },
         "required": [
            "curation",
            "curates",
            "imports",
            "scope",
            "accepts_external_contributions",
            "public_version_controlled_data",
            "review_team",
            "status"
         ],
         "title": "RegistryGovernance",
         "type": "object"
      },
      "RegistryQualities": {
         "description": "Qualities about a registry.",
         "properties": {
            "structured_data": {
               "description": "This field denotes if the registry provides structured access to its data? For example, this can be through an API (e.g., FAIRsharing, OLS) or a bulk download (e.g., OBO Foundry) in a structured file format. A counter-example is a site that must be scraped to acquire its content (e.g, the NCBI GenBank).",
               "title": "Structured Data",
               "type": "boolean"
            },
            "bulk_data": {
               "description": "This field denotes if the registry provides a bulk dump of its data? For example, the OBO Foundry provides its bulk data in a file and Identifiers.org provides its bulk data in an API endpoint. A counterexample is FAIRsharing, which requires slow, expensive pagination through its data. Another counterexample is HL7 which requires manually navigating a form to download its content. While GenBank is not structured, it is still bulk downloadable.",
               "title": "Bulk Data",
               "type": "boolean"
            },
            "no_authentication": {
               "description": "This field denotes if the registry provides access to its data without an API key? For example, Identifiers.org. As a counter-example, BioPortal requires an API key for access to its structured data.",
               "title": "No Authentication",
               "type": "boolean"
            },
            "automatable_download": {
               "default": true,
               "description": "This field denotes if the registry makes its data available downloadable in an automated way?This includes websites that have bulk downloads, paginated API downloads, or even require scraping.A counter example is HL7, whose download can not be automated due to the need to interact with a web form.",
               "title": "Automatable Download",
               "type": "boolean"
            }
         },
         "required": [
            "structured_data",
            "bulk_data",
            "no_authentication"
         ],
         "title": "RegistryQualities",
         "type": "object"
      },
      "RegistrySchema": {
         "description": "Metadata about a registry's schema.",
         "properties": {
            "name": {
               "description": "This field denotes if a name is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Name",
               "type": "string"
            },
            "homepage": {
               "description": "This field denotes if a homepage is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Homepage",
               "type": "string"
            },
            "description": {
               "description": "This field denotes if a description is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Description",
               "type": "string"
            },
            "example": {
               "description": "This field denotes if an example local unique identifier is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Example",
               "type": "string"
            },
            "pattern": {
               "description": "This field denotes if a regular expression pattern for matching local unique identifiers is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Pattern",
               "type": "string"
            },
            "provider": {
               "description": "This field denotes if a URI format string for converting local unique identifiers into URIs is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Provider",
               "type": "string"
            },
            "alternate_providers": {
               "description": "This field denotes if additional/secondary URI format strings for converting local unique identifiers into URIs is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "present",
                  "missing"
               ],
               "title": "Alternate Providers",
               "type": "string"
            },
            "synonyms": {
               "description": "This field denotes if alternative prefixes (e.g., taxonomy for NCBITaxon) is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "present",
                  "missing"
               ],
               "title": "Synonyms",
               "type": "string"
            },
            "license": {
               "description": "This field denotes if capturing the data license is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "License",
               "type": "string"
            },
            "version": {
               "description": "This field denotes if capturing the current data version is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Version",
               "type": "string"
            },
            "contact": {
               "description": "This field denotes if capturing the primary responsible person's contact information (e.g., name, ORCID, email) is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "title": "Contact",
               "type": "string"
            },
            "search": {
               "description": "This field denotes if the registry provides either a dedicated page for searching for prefixes (e.g. AberOWL has a dedicated search page) OR a contextual search (e.g., AgroPortal has a prefix search built in its homepage).",
               "title": "Prefix Search",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "homepage",
            "description",
            "example",
            "pattern",
            "provider",
            "alternate_providers",
            "synonyms",
            "license",
            "version",
            "contact",
            "search"
         ],
         "title": "RegistrySchema",
         "type": "object"
      }
   },
   "required": [
      "prefix",
      "name",
      "description",
      "homepage",
      "example",
      "availability",
      "qualities",
      "governance",
      "contact"
   ]
}

Fields:
field availability: RegistrySchema [Required]

A structured description of the metadata that the registry collects

field bibtex: str | None = None

Citation key used in BibTex for this registry.

field bioregistry_prefix: str | None = None

The prefix for this registry in the Bioregistry

field contact: Attributable [Required]

The contact for the registry.

field description: str [Required]

A full description of the registry.

field download: str | None = None

A download link for the data contained in the registry

field example: str [Required]

An example prefix inside the registry.

field governance: RegistryGovernance [Required]

A structured description of the governance for the registry

field homepage: str [Required]

The URL for the homepage of the registry.

field license: str | None = None

The license under which the resource is redistributed

field logo_url: str | None = None

The URL for the logo of the resource

field name: str [Required]

The human-readable label for the registry

field prefix: str [Required]

The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is miriam.

field provider_uri_format: str | None = None

A URL with a $1 for a prefix to resolve in the registry

field qualities: RegistryQualities [Required]

A structured description of the registry’s qualities

field resolver_type: str | None = None

An optional type annotation for what kind of resolver it is (i.e., redirect or lookup)

field resolver_uri_format: str | None = None

A URL with a $1 for a prefix and $2 for an identifier to resolve in the registry

field search_uri_format: str | None = None

A URL with a $1 for a prefix or string for searching for prefixes

field short_name: str | None = None

A short name for the resource, e.g., for use in charts

add_triples(graph: rdflib.Graph) rdflib.term.Node[source]

Add triples to an RDF graph for this registry.

Parameters:

graph – An RDF graph

Returns:

The RDF node representing this registry using a Bioregistry IRI.

Get a link to the code on github that downloads this resource.

get_provider_uri_format(external_prefix: str) str | None[source]

Get the provider string.

Parameters:

external_prefix – The prefix used in the metaregistry

Returns:

The URL in the registry for the prefix, if it’s able to provide one

>>> from bioregistry import get_registry
>>> get_registry("fairsharing").get_provider_uri_format("FAIRsharing.62qk8w")
'https://fairsharing.org/FAIRsharing.62qk8w'
>>> get_registry("miriam").get_provider_uri_format("go")
'https://registry.identifiers.org/registry/go'
>>> get_registry("n2t").get_provider_uri_format("go")
'https://bioregistry.io/metaregistry/n2t/resolve/go'
get_provider_uri_prefix() str[source]

Get provider URI prefix.

Returns:

The URI prefix for the provider for prefixes in this registry.

>>> from bioregistry import get_registry
>>> get_registry("fairsharing").get_provider_uri_prefix()
'https://fairsharing.org/'
>>> get_registry("miriam").get_provider_uri_prefix()
'https://registry.identifiers.org/registry/'
>>> get_registry("n2t").get_provider_uri_prefix()
'https://bioregistry.io/metaregistry/n2t/resolve/'
get_quality_score() int[source]

Get the quality score for this registry.

get_resolver_uri_format(prefix: str) str[source]

Generate a provider URI string based on mapping through this registry’s vocabulary.

Parameters:

prefix – The prefix used in the metaregistry

Returns:

The URI format string to be used for identifiers in the semantic space based on this resolver or the Bioregistry’s meta-resolver.

>>> from bioregistry import get_registry
>>> get_registry("miriam").get_resolver_uri_format("go")
'https://identifiers.org/go:$1'
>>> get_registry("cellosaurus").get_resolver_uri_format("go")
'https://bioregistry.io/metaregistry/cellosaurus/go:$1'
>>> get_registry("n2t").get_resolver_uri_format("go")
'https://n2t.net/go:$1'
get_short_name() str[source]

Get the short name or full name if none annotated.

resolve(prefix: str, identifier: str) str | None[source]

Resolve the registry-specific prefix and identifier.

Parameters:
  • prefix – The prefix used in the metaregistry

  • identifier – The identifier in the semantic space

Returns:

The URI format string for the given CURIE.

>>> from bioregistry import get_registry
>>> get_registry("miriam").resolve("go", "0032571")
'https://identifiers.org/go:0032571'
>>> get_registry("cellosaurus").resolve("go", "0032571")
'https://bioregistry.io/metaregistry/cellosaurus/go:0032571'
>>> get_registry("rrid").resolve("AB", "493771")
'https://scicrunch.org/resolver/RRID:AB_493771'
score() int[source]

Calculate a metadata score/goodness for this registry.

property has_permissive_license: bool

Check if the registry has a permissive license.

property is_lookup: bool

Check if it is a lookup service.

property is_prefix_provider: bool

Check if the registry is a prefix provider.

property is_resolver: bool

Check if it is a resolver.