API Reference
Idiomatic conversion between URIs and compact URIs (CURIEs).
Functions
|
Chain several converters. |
|
Discover new URI prefixes and construct a converter with a unique dummy CURIE prefix for each. |
|
Discover new URI prefixes from RDF content via |
|
Filter a dataframe based on CURIEs in a given column having a given prefix or set of prefixes. |
|
Filter a dataframe based on CURIEs in a given column having a given prefix or set of prefixes. |
|
Get the latest extended prefix map from the Bioregistry [hoyt2022]. |
Get the Prefix Commons-maintained GO context. |
|
Get the Prefix Commons-maintained Monarch context. |
|
Get the latest OBO Foundry context. |
|
|
Get a Prefix Commons-maintained context. |
|
Get the |
|
Get a converter from a list of dictionaries by creating records out of them. |
|
Get a converter from a JSON-LD object, which contains a prefix map in its |
|
Get a converter from a simple prefix map. |
|
Get a converter from a JSON-LD object, which contains a prefix map in its |
|
Process multiple semantically processable instances. |
|
Apply CURIE prefix remappings. |
|
Apply URI prefix remappings. |
|
Apply URI prefix upgrades. |
|
Standardize an instance. |
|
Convert a (potentially problematic) prefix map (i.e., not bijective) into a list of records. |
|
Write an extended prefix map as JSON to a file. |
|
Write the converter's bijective map as a JSON-LD context to a file. |
|
Write the converter's bijective map as SHACL in turtle RDF to a file. |
|
Write a simple prefix map CSV file. |
Classes
|
A cached prefix map data structure. |
|
An error raised with constructing a converter with data containing duplicate prefixes. |
|
An error raised with constructing a converter with data containing duplicate URI prefixes. |
|
An error raised with constructing a converter with data containing duplicate values. |
|
A reference, maybe with a name. |
|
A reference with a name. |
|
A model for post-processing based on the prefix parsed. |
A string that is validated by Pydantic as a CURIE prefix. |
|
|
A simple prefix map. |
|
A model for prefix and full blocklists. |
|
A converter with pre-processing rules. |
|
A model for prefix and full rewrites. |
|
A model for blocklists and rewrites. |
|
A record of some prefixes and their associated URI prefixes. |
|
A list of records. |
|
A reference to an entity in a given identifier space. |
|
A pair of a prefix (corresponding to a semantic space) and a local unique identifier in that semantic space. |
A class that can be processed with a converter. |
|
An object that can be standardized. |
|
|
A Pydantic model for a subject-predicate-object triple. |
Class Inheritance Diagram
digraph inheritance8d98751f35 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseModel" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="!!! abstract \"Usage Documentation\""]; "Converter" [URL="api/curies.Converter.html#curies.Converter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A cached prefix map data structure."]; "DuplicatePrefixes" [URL="api/curies.DuplicatePrefixes.html#curies.DuplicatePrefixes",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error raised with constructing a converter with data containing duplicate prefixes."]; "DuplicateValueError" -> "DuplicatePrefixes" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DuplicateURIPrefixes" [URL="api/curies.DuplicateURIPrefixes.html#curies.DuplicateURIPrefixes",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error raised with constructing a converter with data containing duplicate URI prefixes."]; "DuplicateValueError" -> "DuplicateURIPrefixes" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DuplicateValueError" [URL="api/curies.DuplicateValueError.html#curies.DuplicateValueError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error raised with constructing a converter with data containing duplicate values."]; "Generic" [URL="https://docs.python.org/3/library/typing.html#typing.Generic",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for generic types."]; "NamableReference" [URL="api/curies.NamableReference.html#curies.NamableReference",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A reference, maybe with a name."]; "Reference" -> "NamableReference" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NamedReference" [URL="api/curies.NamedReference.html#curies.NamedReference",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A reference with a name."]; "NamableReference" -> "NamedReference" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PostprocessingRewrites" [URL="api/curies.PostprocessingRewrites.html#curies.PostprocessingRewrites",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A model for post-processing based on the prefix parsed."]; "BaseModel" -> "PostprocessingRewrites" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Prefix" [URL="api/curies.Prefix.html#curies.Prefix",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A string that is validated by Pydantic as a CURIE prefix."]; "PrefixMap" [URL="api/curies.PrefixMap.html#curies.PrefixMap",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A simple prefix map."]; "RootModel[dict[Prefix, str]]" -> "PrefixMap" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PreprocessingBlocklists" [URL="api/curies.PreprocessingBlocklists.html#curies.PreprocessingBlocklists",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A model for prefix and full blocklists."]; "BaseModel" -> "PreprocessingBlocklists" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PreprocessingConverter" [URL="api/curies.PreprocessingConverter.html#curies.PreprocessingConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A converter with pre-processing rules."]; "Converter" -> "PreprocessingConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PreprocessingRewrites" [URL="api/curies.PreprocessingRewrites.html#curies.PreprocessingRewrites",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A model for prefix and full rewrites."]; "BaseModel" -> "PreprocessingRewrites" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PreprocessingRules" [URL="api/curies.PreprocessingRules.html#curies.PreprocessingRules",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A model for blocklists and rewrites."]; "BaseModel" -> "PreprocessingRules" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Record" [URL="api/curies.Record.html#curies.Record",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A record of some prefixes and their associated URI prefixes."]; "BaseModel" -> "Record" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Records" [URL="api/curies.Records.html#curies.Records",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A list of records."]; "RootModel[list[Record]]" -> "Records" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Reference" [URL="api/curies.Reference.html#curies.Reference",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A reference to an entity in a given identifier space."]; "BaseModel" -> "Reference" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ReferenceTuple" [URL="api/curies.ReferenceTuple.html#curies.ReferenceTuple",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A pair of a prefix (corresponding to a semantic space) and a local unique identifier in that semantic space."]; "RootModel" [URL="https://pydantic.dev/docs/validation/latest/api/pydantic/root_model/#pydantic.root_model.RootModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="!!! abstract \"Usage Documentation\""]; "BaseModel" -> "RootModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Generic" -> "RootModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "RootModel[dict[Prefix, str]]" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "RootModel" -> "RootModel[dict[Prefix, str]]" [arrowsize=0.5,style="setlinewidth(0.5)"]; "RootModel[list[Record]]" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "RootModel" -> "RootModel[list[Record]]" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SemanticallyProcessable" [URL="api/curies.SemanticallyProcessable.html#curies.SemanticallyProcessable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class that can be processed with a converter."]; "ABC" -> "SemanticallyProcessable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Generic" -> "SemanticallyProcessable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SemanticallyStandardizable" [URL="api/curies.SemanticallyStandardizable.html#curies.SemanticallyStandardizable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An object that can be standardized."]; "ABC" -> "SemanticallyStandardizable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Triple" [URL="api/curies.Triple.html#curies.Triple",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Pydantic model for a subject-predicate-object triple."]; "BaseModel" -> "Triple" [arrowsize=0.5,style="setlinewidth(0.5)"]; }Dataframe operations.
Functions
|
Filter a dataframe based on CURIEs in a given column having a given prefix or set of prefixes. |
|
Filter a dataframe based on CURIEs in a given column having a given prefix or set of prefixes. |
|
Get a dictionary from CURIEs that appear in the column to the row indexes where they appear. |
|
Get a dictionary from prefixes that appear in the column to the row indexes where they appear. |
|
Get unique prefixes. |
|
Get an index of CURIEs in the given column that are the given CURIE(s). |
|
Get an index of CURIEs in the given column that start with the prefix(es). |