Registry

pydantic model Registry[source]

Metadata about a registry.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Registry",
   "description": "Metadata about a registry.",
   "type": "object",
   "properties": {
      "prefix": {
         "title": "Prefix",
         "description": "The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is `miriam`.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "The human-readable label for the registry",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "A full description of the registry.",
         "type": "string"
      },
      "homepage": {
         "title": "Homepage",
         "description": "The URL for the homepage of the registry.",
         "type": "string"
      },
      "example": {
         "title": "Example",
         "description": "An example prefix inside the registry.",
         "type": "string"
      },
      "availability": {
         "title": "Availability",
         "description": "A structured description of the metadata that the registry collects",
         "allOf": [
            {
               "$ref": "#/definitions/RegistrySchema"
            }
         ]
      },
      "governance": {
         "title": "Governance",
         "description": "A structured description of the governance for the registry",
         "allOf": [
            {
               "$ref": "#/definitions/RegistryGovernance"
            }
         ]
      },
      "download": {
         "title": "Download",
         "description": "A download link for the data contained in the registry",
         "type": "string"
      },
      "provider_uri_format": {
         "title": "Provider Uri Format",
         "description": "A URL with a $1 for a prefix to resolve in the registry",
         "type": "string"
      },
      "resolver_uri_format": {
         "title": "Resolver Uri Format",
         "description": "A URL with a $1 for a prefix and $2 for an identifier to resolve in the registry",
         "type": "string"
      },
      "resolver_type": {
         "title": "Resolver Type",
         "description": "An optional type annotation for what kind of resolver it is (i.e., redirect or lookup)",
         "type": "string"
      },
      "contact": {
         "title": "Contact",
         "description": "The contact for the registry.",
         "allOf": [
            {
               "$ref": "#/definitions/Attributable"
            }
         ]
      },
      "bioregistry_prefix": {
         "title": "Bioregistry Prefix",
         "description": "The prefix for this registry in the Bioregistry",
         "type": "string"
      },
      "logo_url": {
         "title": "Logo Url",
         "description": "The URL for the logo of the resource",
         "type": "string"
      },
      "license": {
         "title": "License",
         "description": "The license under which the resource is redistributed",
         "type": "string"
      },
      "short_name": {
         "title": "Short Name",
         "description": "A short name for the resource, e.g., for use in charts",
         "type": "string"
      }
   },
   "required": [
      "prefix",
      "name",
      "description",
      "homepage",
      "example",
      "availability",
      "governance",
      "contact"
   ],
   "definitions": {
      "RegistrySchema": {
         "title": "RegistrySchema",
         "description": "Metadata about a registry's schema.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "homepage": {
               "title": "Homepage",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "description": {
               "title": "Description",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "example": {
               "title": "Example",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "pattern": {
               "title": "Pattern",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "provider": {
               "title": "Provider",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "alternate_providers": {
               "title": "Alternate Providers",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "synonyms": {
               "title": "Synonyms",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "license": {
               "title": "License",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "version": {
               "title": "Version",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "contact": {
               "title": "Contact",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "search": {
               "title": "Search",
               "description": "Does this registry provide a URL into which a search query can be formatted to show a list of results?",
               "type": "boolean"
            },
            "fair": {
               "title": "Fair",
               "description": "Does this registry provide a structured bulk dump of its prefixes, records, and all associated metadata in an easily findable and accessible manner?",
               "type": "boolean"
            },
            "fair_note": {
               "title": "Fair Note",
               "description": "Explanation for why data isn't FAIR",
               "type": "string"
            }
         },
         "required": [
            "name",
            "homepage",
            "description",
            "example",
            "pattern",
            "provider",
            "alternate_providers",
            "synonyms",
            "license",
            "version",
            "contact",
            "search",
            "fair"
         ]
      },
      "RegistryGovernance": {
         "title": "RegistryGovernance",
         "description": "Metadata about a registry's governance.",
         "type": "object",
         "properties": {
            "curation": {
               "title": "Curation",
               "enum": [
                  "private",
                  "import",
                  "community",
                  "opaque-review",
                  "open-review"
               ],
               "type": "string"
            },
            "curates": {
               "title": "Curates",
               "description": "Does the registry curate novel prefixes?",
               "type": "boolean"
            },
            "imports": {
               "title": "Imports",
               "description": "Does the registry import and align prefixes from other registries?",
               "type": "boolean"
            },
            "scope": {
               "title": "Scope",
               "description": "What is 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.",
               "type": "string"
            },
            "comments": {
               "title": "Comments",
               "type": "string"
            },
            "accepts_external_contributions": {
               "title": "Accepts External Contributions",
               "description": "Does the registry (in theory) accept 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.",
               "type": "boolean"
            },
            "public_version_control": {
               "title": "Public Version Control",
               "description": "Does the registry store its data/code in publicly available version control system, such as GitHub or GitLab? Currently there is no resource that does one but not the other, so this is grouped (for now).",
               "type": "boolean"
            },
            "review_team": {
               "title": "Review Team",
               "description": "Are the reviewers 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.",
               "enum": [
                  "public",
                  "inferrable",
                  "private",
                  "n/a"
               ],
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "What is the 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"
               ],
               "type": "string"
            }
         },
         "required": [
            "curation",
            "curates",
            "imports",
            "scope",
            "accepts_external_contributions",
            "public_version_control",
            "review_team",
            "status"
         ]
      },
      "Attributable": {
         "title": "Attributable",
         "description": "An upper-level metadata for a researcher.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "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.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name"
         ]
      }
   }
}

Fields
field availability: RegistrySchema [Required]

A structured description of the metadata that the registry collects

field bioregistry_prefix: Optional[str] = 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: Optional[str] = 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: Optional[str] = None

The license under which the resource is redistributed

field logo_url: Optional[str] = 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: Optional[str] = None

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

field resolver_type: Optional[str] = None

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

field resolver_uri_format: Optional[str] = None

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

field short_name: Optional[str] = None

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

add_triples(graph)[source]

Add triples to an RDF graph for this registry.

Parameters

graph (rdflib.Graph) – An RDF graph

Return type

rdflib.term.Node

Returns

The RDF node representing this registry using a Bioregistry IRI.

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

Return type

Optional[str]

get_provider_uri_format(prefix)[source]

Get the provider string.

Parameters

prefix (str) – The prefix used in the metaregistry

Return type

Optional[str]

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/go'
get_provider_uri_prefix()[source]

Get provider URI prefix.

Return type

str

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/'
get_resolver_uri_format(prefix)[source]

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

Parameters

prefix (str) – The prefix used in the metaregistry

Return type

str

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()[source]

Get the short name or full name if none annotated.

Return type

str

resolve(prefix, identifier)[source]

Resolve the registry-specific prefix and identifier.

Parameters
  • prefix (str) – The prefix used in the metaregistry

  • identifier (str) – The identifier in the semantic space

Return type

Optional[str]

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'
score()[source]

Calculate a metadata score/goodness for this registry.

Return type

int

property is_lookup: bool

Check if it is a lookup service.

Return type

bool

property is_resolver: bool

Check if it is a resolver.

Return type

bool