# {py:mod}`pyirk.core` ```{py:module} pyirk.core ``` ```{autodoc2-docstring} pyirk.core :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Entity ` - ```{autodoc2-docstring} pyirk.core.Entity :summary: ``` * - {py:obj}`PrefixShortCut ` - ```{autodoc2-docstring} pyirk.core.PrefixShortCut :summary: ``` * - {py:obj}`DataStore ` - ```{autodoc2-docstring} pyirk.core.DataStore :summary: ``` * - {py:obj}`EType ` - ```{autodoc2-docstring} pyirk.core.EType :summary: ``` * - {py:obj}`SType ` - ```{autodoc2-docstring} pyirk.core.SType :summary: ``` * - {py:obj}`VType ` - ```{autodoc2-docstring} pyirk.core.VType :summary: ``` * - {py:obj}`ProcessedStmtKey ` - ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey :summary: ``` * - {py:obj}`Item ` - * - {py:obj}`KWArgManager ` - ```{autodoc2-docstring} pyirk.core.KWArgManager :summary: ``` * - {py:obj}`SingleKWArgProcessor ` - ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor :summary: ``` * - {py:obj}`Relation ` - * - {py:obj}`RelationRole ` - ```{autodoc2-docstring} pyirk.core.RelationRole :summary: ``` * - {py:obj}`KeyManager ` - ```{autodoc2-docstring} pyirk.core.KeyManager :summary: ``` * - {py:obj}`RawQualifier ` - ```{autodoc2-docstring} pyirk.core.RawQualifier :summary: ``` * - {py:obj}`QualifierFactory ` - ```{autodoc2-docstring} pyirk.core.QualifierFactory :summary: ``` * - {py:obj}`Statement ` - ```{autodoc2-docstring} pyirk.core.Statement :summary: ``` * - {py:obj}`QualifierStatement ` - * - {py:obj}`Context ` - ```{autodoc2-docstring} pyirk.core.Context :summary: ``` * - {py:obj}`abstract_uri_context ` - ```{autodoc2-docstring} pyirk.core.abstract_uri_context :summary: ``` * - {py:obj}`uri_context ` - ```{autodoc2-docstring} pyirk.core.uri_context :summary: ``` * - {py:obj}`search_uri_context ` - ```{autodoc2-docstring} pyirk.core.search_uri_context :summary: ``` * - {py:obj}`LanguageCode ` - ```{autodoc2-docstring} pyirk.core.LanguageCode :summary: ``` * - {py:obj}`RuleResult ` - ```{autodoc2-docstring} pyirk.core.RuleResult :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`check_type ` - ```{autodoc2-docstring} pyirk.core.check_type :summary: ``` * - {py:obj}`wrap_function_with_search_uri_context ` - ```{autodoc2-docstring} pyirk.core.wrap_function_with_search_uri_context :summary: ``` * - {py:obj}`unpack_l1d ` - ```{autodoc2-docstring} pyirk.core.unpack_l1d :summary: ``` * - {py:obj}`process_key_str ` - ```{autodoc2-docstring} pyirk.core.process_key_str :summary: ``` * - {py:obj}`_resolve_prefix ` - ```{autodoc2-docstring} pyirk.core._resolve_prefix :summary: ``` * - {py:obj}`check_processed_key_label ` - ```{autodoc2-docstring} pyirk.core.check_processed_key_label :summary: ``` * - {py:obj}`ilk2nlk ` - ```{autodoc2-docstring} pyirk.core.ilk2nlk :summary: ``` * - {py:obj}`u ` - ```{autodoc2-docstring} pyirk.core.u :summary: ``` * - {py:obj}`get_active_mod_uri ` - ```{autodoc2-docstring} pyirk.core.get_active_mod_uri :summary: ``` * - {py:obj}`process_kwargs_for_entity_creation ` - ```{autodoc2-docstring} pyirk.core.process_kwargs_for_entity_creation :summary: ``` * - {py:obj}`process_lang_related_kwargs_for_entity_creation ` - ```{autodoc2-docstring} pyirk.core.process_lang_related_kwargs_for_entity_creation :summary: ``` * - {py:obj}`create_item ` - ```{autodoc2-docstring} pyirk.core.create_item :summary: ``` * - {py:obj}`run_hooks ` - ```{autodoc2-docstring} pyirk.core.run_hooks :summary: ``` * - {py:obj}`register_hook ` - ```{autodoc2-docstring} pyirk.core.register_hook :summary: ``` * - {py:obj}`pop_uri_based_key ` - ```{autodoc2-docstring} pyirk.core.pop_uri_based_key :summary: ``` * - {py:obj}`repl_spc_by_udsc ` - ```{autodoc2-docstring} pyirk.core.repl_spc_by_udsc :summary: ``` * - {py:obj}`tolerant_removal ` - ```{autodoc2-docstring} pyirk.core.tolerant_removal :summary: ``` * - {py:obj}`create_relation ` - ```{autodoc2-docstring} pyirk.core.create_relation :summary: ``` * - {py:obj}`create_builtin_item ` - ```{autodoc2-docstring} pyirk.core.create_builtin_item :summary: ``` * - {py:obj}`create_builtin_relation ` - ```{autodoc2-docstring} pyirk.core.create_builtin_relation :summary: ``` * - {py:obj}`generate_new_key ` - ```{autodoc2-docstring} pyirk.core.generate_new_key :summary: ``` * - {py:obj}`print_new_keys ` - ```{autodoc2-docstring} pyirk.core.print_new_keys :summary: ``` * - {py:obj}`get_caller_frame ` - ```{autodoc2-docstring} pyirk.core.get_caller_frame :summary: ``` * - {py:obj}`get_key_str_by_inspection ` - ```{autodoc2-docstring} pyirk.core.get_key_str_by_inspection :summary: ``` * - {py:obj}`get_mod_name_by_inspection ` - ```{autodoc2-docstring} pyirk.core.get_mod_name_by_inspection :summary: ``` * - {py:obj}`get_mod_id_list_by_inspection ` - ```{autodoc2-docstring} pyirk.core.get_mod_id_list_by_inspection :summary: ``` * - {py:obj}`unload_mod ` - ```{autodoc2-docstring} pyirk.core.unload_mod :summary: ``` * - {py:obj}`_unlink_entity ` - ```{autodoc2-docstring} pyirk.core._unlink_entity :summary: ``` * - {py:obj}`replace_and_unlink_entity ` - ```{autodoc2-docstring} pyirk.core.replace_and_unlink_entity :summary: ``` * - {py:obj}`register_mod ` - ```{autodoc2-docstring} pyirk.core.register_mod :summary: ``` * - {py:obj}`start_mod ` - ```{autodoc2-docstring} pyirk.core.start_mod :summary: ``` * - {py:obj}`end_mod ` - ```{autodoc2-docstring} pyirk.core.end_mod :summary: ``` * - {py:obj}`get_language_of_str_literal ` - ```{autodoc2-docstring} pyirk.core.get_language_of_str_literal :summary: ``` * - {py:obj}`is_true ` - ```{autodoc2-docstring} pyirk.core.is_true :summary: ``` * - {py:obj}`format_entity_html ` - ```{autodoc2-docstring} pyirk.core.format_entity_html :summary: ``` * - {py:obj}`format_literal_html ` - ```{autodoc2-docstring} pyirk.core.format_literal_html :summary: ``` * - {py:obj}`script_main ` - ```{autodoc2-docstring} pyirk.core.script_main :summary: ``` * - {py:obj}`is_subclass ` - ```{autodoc2-docstring} pyirk.core.is_subclass :summary: ``` * - {py:obj}`is_instance ` - ```{autodoc2-docstring} pyirk.core.is_instance :summary: ``` * - {py:obj}`is_subproperty ` - ```{autodoc2-docstring} pyirk.core.is_subproperty :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`allowed_literal_types ` - ```{autodoc2-docstring} pyirk.core.allowed_literal_types :summary: ``` * - {py:obj}`RELKEYS_WITH_LITERAL_RANGE ` - ```{autodoc2-docstring} pyirk.core.RELKEYS_WITH_LITERAL_RANGE :summary: ``` * - {py:obj}`pf ` - ```{autodoc2-docstring} pyirk.core.pf :summary: ``` * - {py:obj}`ds ` - ```{autodoc2-docstring} pyirk.core.ds :summary: ``` * - {py:obj}`YAML_VALUE ` - ```{autodoc2-docstring} pyirk.core.YAML_VALUE :summary: ``` * - {py:obj}`re_prefix_shortkey_suffix ` - ```{autodoc2-docstring} pyirk.core.re_prefix_shortkey_suffix :summary: ``` * - {py:obj}`re_suffix_underscore ` - ```{autodoc2-docstring} pyirk.core.re_suffix_underscore :summary: ``` * - {py:obj}`re_suffix_square_brackets ` - ```{autodoc2-docstring} pyirk.core.re_suffix_square_brackets :summary: ``` * - {py:obj}`langcode_end_pattern ` - ```{autodoc2-docstring} pyirk.core.langcode_end_pattern :summary: ``` * - {py:obj}`VALID_HOOK_PHASES ` - ```{autodoc2-docstring} pyirk.core.VALID_HOOK_PHASES :summary: ``` * - {py:obj}`VALID_HOOK_TYPES ` - ```{autodoc2-docstring} pyirk.core.VALID_HOOK_TYPES :summary: ``` * - {py:obj}`_uri_stack ` - ```{autodoc2-docstring} pyirk.core._uri_stack :summary: ``` * - {py:obj}`_search_uri_stack ` - ```{autodoc2-docstring} pyirk.core._search_uri_stack :summary: ``` * - {py:obj}`df ` - ```{autodoc2-docstring} pyirk.core.df :summary: ``` * - {py:obj}`en ` - ```{autodoc2-docstring} pyirk.core.en :summary: ``` * - {py:obj}`de ` - ```{autodoc2-docstring} pyirk.core.de :summary: ``` * - {py:obj}`fr ` - ```{autodoc2-docstring} pyirk.core.fr :summary: ``` * - {py:obj}`it ` - ```{autodoc2-docstring} pyirk.core.it :summary: ``` * - {py:obj}`es ` - ```{autodoc2-docstring} pyirk.core.es :summary: ``` ```` ### API ````{py:data} allowed_literal_types :canonical: pyirk.core.allowed_literal_types :value: > () ```{autodoc2-docstring} pyirk.core.allowed_literal_types ``` ```` ````{py:data} RELKEYS_WITH_LITERAL_RANGE :canonical: pyirk.core.RELKEYS_WITH_LITERAL_RANGE :value: > ('R1', 'R2', 'R77') ```{autodoc2-docstring} pyirk.core.RELKEYS_WITH_LITERAL_RANGE ``` ```` ````{py:function} check_type(obj, expected_type, strict=True) :canonical: pyirk.core.check_type ```{autodoc2-docstring} pyirk.core.check_type ``` ```` `````{py:class} Entity(base_uri) :canonical: pyirk.core.Entity Bases: {py:obj}`abc.ABC` ```{autodoc2-docstring} pyirk.core.Entity ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.Entity.__init__ ``` ````{py:attribute} short_key :canonical: pyirk.core.Entity.short_key :type: str :value: > None ```{autodoc2-docstring} pyirk.core.Entity.short_key ``` ```` ````{py:method} __call__(*args, **kwargs) :canonical: pyirk.core.Entity.__call__ ```{autodoc2-docstring} pyirk.core.Entity.__call__ ``` ```` ````{py:method} idoc(adhoc_label: str) :canonical: pyirk.core.Entity.idoc ```{autodoc2-docstring} pyirk.core.Entity.idoc ``` ```` ````{py:method} __getitem__(adhoc_label) :canonical: pyirk.core.Entity.__getitem__ ```{autodoc2-docstring} pyirk.core.Entity.__getitem__ ``` ```` ````{py:method} __getattr__(attr_name) :canonical: pyirk.core.Entity.__getattr__ ```{autodoc2-docstring} pyirk.core.Entity.__getattr__ ``` ```` ````{py:method} __setattr__(attr_name: str, attr_value: typing.Any) :canonical: pyirk.core.Entity.__setattr__ ```` ````{py:method} __process_attribute_name(attr_name: str, exception_type=AttributeError) -> pyirk.core.ProcessedStmtKey :canonical: pyirk.core.Entity.__process_attribute_name ```{autodoc2-docstring} pyirk.core.Entity.__process_attribute_name ``` ```` ````{py:method} __eq__(other) :canonical: pyirk.core.Entity.__eq__ ```` ````{py:method} __post_init__() :canonical: pyirk.core.Entity.__post_init__ ```{autodoc2-docstring} pyirk.core.Entity.__post_init__ ``` ```` ````{py:method} _perform_inheritance() :canonical: pyirk.core.Entity._perform_inheritance ```{autodoc2-docstring} pyirk.core.Entity._perform_inheritance ``` ```` ````{py:method} _perform_instantiation() :canonical: pyirk.core.Entity._perform_instantiation ```{autodoc2-docstring} pyirk.core.Entity._perform_instantiation ``` ```` ````{py:method} _get_relation_contents(rel_uri: str, lang_indicator=None) :canonical: pyirk.core.Entity._get_relation_contents ```{autodoc2-docstring} pyirk.core.Entity._get_relation_contents ``` ```` ````{py:method} add_method_to_class(func) :canonical: pyirk.core.Entity.add_method_to_class :classmethod: ```{autodoc2-docstring} pyirk.core.Entity.add_method_to_class ``` ```` ````{py:method} add_method(func: callable, name: typing.Optional[str] = None) :canonical: pyirk.core.Entity.add_method ```{autodoc2-docstring} pyirk.core.Entity.add_method ``` ```` ````{py:method} _set_relations_from_init_kwargs(**kwargs) :canonical: pyirk.core.Entity._set_relations_from_init_kwargs ```{autodoc2-docstring} pyirk.core.Entity._set_relations_from_init_kwargs ``` ```` ````{py:method} set_multiple_relations(relation: typing.Union[pyirk.core.Relation, str], obj_seq: typing.Union[tuple, list], *args, **kwargs) -> typing.List[pyirk.core.Statement] :canonical: pyirk.core.Entity.set_multiple_relations ```{autodoc2-docstring} pyirk.core.Entity.set_multiple_relations ``` ```` ````{py:method} set_relation(relation: typing.Union[pyirk.core.Relation, str], obj, scope: pyirk.core.Entity = None, proxyitem: typing.Optional[pyirk.core.Item] = None, qualifiers: typing.Optional[typing.List[pyirk.core.RawQualifier]] = None, prevent_duplicate=False) -> typing.Optional[pyirk.core.Statement] :canonical: pyirk.core.Entity.set_relation ```{autodoc2-docstring} pyirk.core.Entity.set_relation ``` ```` ````{py:method} _set_relation(rel_uri: str, rel_content: object, scope: typing.Optional[pyirk.core.Entity] = None, qualifiers: typing.Optional[list] = None, proxyitem: typing.Optional[pyirk.core.Item] = None) -> pyirk.core.Statement :canonical: pyirk.core.Entity._set_relation ```{autodoc2-docstring} pyirk.core.Entity._set_relation ``` ```` ````{py:method} get_relations(key_str_or_uri: typing.Optional[str] = None, return_subj: bool = False, return_obj: bool = False) -> typing.Union[typing.Dict[str, list], list] :canonical: pyirk.core.Entity.get_relations ```{autodoc2-docstring} pyirk.core.Entity.get_relations ``` ```` ````{py:method} get_inv_relations(key_str_or_uri: typing.Optional[str] = None, return_subj: bool = False, return_obj: bool = False) -> typing.Union[typing.Dict[str, list], list] :canonical: pyirk.core.Entity.get_inv_relations ```{autodoc2-docstring} pyirk.core.Entity.get_inv_relations ``` ```` ````{py:method} _return_relations(base_dict, key_str_or_uri: str, return_subj: bool = False, return_obj: bool = False) -> typing.Union[typing.Dict[str, list], list] :canonical: pyirk.core.Entity._return_relations :staticmethod: ```{autodoc2-docstring} pyirk.core.Entity._return_relations ``` ```` ````{py:method} overwrite_statement(rel_key_str_or_uri: str, new_obj: pyirk.core.Entity, qualifiers=None) -> pyirk.core.Statement :canonical: pyirk.core.Entity.overwrite_statement ```{autodoc2-docstring} pyirk.core.Entity.overwrite_statement ``` ```` ````{py:method} finalize() :canonical: pyirk.core.Entity.finalize ```{autodoc2-docstring} pyirk.core.Entity.finalize ``` ```` ````{py:method} __hash__() :canonical: pyirk.core.Entity.__hash__ ```{autodoc2-docstring} pyirk.core.Entity.__hash__ ``` ```` ````{py:method} update_relations(**kwargs) :canonical: pyirk.core.Entity.update_relations ```{autodoc2-docstring} pyirk.core.Entity.update_relations ``` ```` ````` ````{py:function} wrap_function_with_search_uri_context(func, uri=None) :canonical: pyirk.core.wrap_function_with_search_uri_context ```{autodoc2-docstring} pyirk.core.wrap_function_with_search_uri_context ``` ```` `````{py:class} PrefixShortCut :canonical: pyirk.core.PrefixShortCut ```{autodoc2-docstring} pyirk.core.PrefixShortCut ``` ````{py:method} __getattribute__(prefix_name: str) -> typing.Any :canonical: pyirk.core.PrefixShortCut.__getattribute__ ```` ````` ````{py:data} pf :canonical: pyirk.core.pf :value: > 'PrefixShortCut(...)' ```{autodoc2-docstring} pyirk.core.pf ``` ```` `````{py:class} DataStore() :canonical: pyirk.core.DataStore ```{autodoc2-docstring} pyirk.core.DataStore ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.DataStore.__init__ ``` ````{py:method} initialize_hooks() -> dict :canonical: pyirk.core.DataStore.initialize_hooks ```{autodoc2-docstring} pyirk.core.DataStore.initialize_hooks ``` ```` ````{py:method} get_item_by_label(label) -> pyirk.core.Entity :canonical: pyirk.core.DataStore.get_item_by_label ```{autodoc2-docstring} pyirk.core.DataStore.get_item_by_label ``` ```` ````{py:method} get_entity_by_key_str(key_str, mod_uri=None) -> pyirk.core.Entity :canonical: pyirk.core.DataStore.get_entity_by_key_str ```{autodoc2-docstring} pyirk.core.DataStore.get_entity_by_key_str ``` ```` ````{py:method} get_entity_by_uri(uri: str, etype=None, strict=True) -> typing.Union[pyirk.core.Entity, None] :canonical: pyirk.core.DataStore.get_entity_by_uri ```{autodoc2-docstring} pyirk.core.DataStore.get_entity_by_uri ``` ```` ````{py:method} _default_subject_filter(entity) :canonical: pyirk.core.DataStore._default_subject_filter :staticmethod: ```{autodoc2-docstring} pyirk.core.DataStore._default_subject_filter ``` ```` ````{py:method} get_subjects_for_relation(rel_uri: str, filter=None) :canonical: pyirk.core.DataStore.get_subjects_for_relation ```{autodoc2-docstring} pyirk.core.DataStore.get_subjects_for_relation ``` ```` ````{py:method} get_statements(entity_uri: str, rel_uri: str) -> typing.List[pyirk.core.Statement] :canonical: pyirk.core.DataStore.get_statements ```{autodoc2-docstring} pyirk.core.DataStore.get_statements ``` ```` ````{py:method} set_statement(stm: pyirk.core.Statement) -> None :canonical: pyirk.core.DataStore.set_statement ```{autodoc2-docstring} pyirk.core.DataStore.set_statement ``` ```` ````{py:method} get_uri_for_prefix(prefix: str) -> str :canonical: pyirk.core.DataStore.get_uri_for_prefix ```{autodoc2-docstring} pyirk.core.DataStore.get_uri_for_prefix ``` ```` ````{py:method} preprocess_query(query) :canonical: pyirk.core.DataStore.preprocess_query ```{autodoc2-docstring} pyirk.core.DataStore.preprocess_query ``` ```` ````{py:method} append_scope(scope) :canonical: pyirk.core.DataStore.append_scope ```{autodoc2-docstring} pyirk.core.DataStore.append_scope ``` ```` ````{py:method} remove_scope(scope) :canonical: pyirk.core.DataStore.remove_scope ```{autodoc2-docstring} pyirk.core.DataStore.remove_scope ``` ```` ````{py:method} get_current_scope() :canonical: pyirk.core.DataStore.get_current_scope ```{autodoc2-docstring} pyirk.core.DataStore.get_current_scope ``` ```` ````` ````{py:data} ds :canonical: pyirk.core.ds :value: > 'DataStore(...)' ```{autodoc2-docstring} pyirk.core.ds ``` ```` ````{py:data} YAML_VALUE :canonical: pyirk.core.YAML_VALUE :value: > None ```{autodoc2-docstring} pyirk.core.YAML_VALUE ``` ```` `````{py:class} EType(*args, **kwds) :canonical: pyirk.core.EType Bases: {py:obj}`enum.Enum` ```{autodoc2-docstring} pyirk.core.EType ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.EType.__init__ ``` ````{py:attribute} ITEM :canonical: pyirk.core.EType.ITEM :value: > 0 ```{autodoc2-docstring} pyirk.core.EType.ITEM ``` ```` ````{py:attribute} RELATION :canonical: pyirk.core.EType.RELATION :value: > 1 ```{autodoc2-docstring} pyirk.core.EType.RELATION ``` ```` ````{py:attribute} LITERAL :canonical: pyirk.core.EType.LITERAL :value: > 2 ```{autodoc2-docstring} pyirk.core.EType.LITERAL ``` ```` ````` `````{py:class} SType(*args, **kwds) :canonical: pyirk.core.SType Bases: {py:obj}`enum.Enum` ```{autodoc2-docstring} pyirk.core.SType ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.SType.__init__ ``` ````{py:attribute} CREATION :canonical: pyirk.core.SType.CREATION :value: > 0 ```{autodoc2-docstring} pyirk.core.SType.CREATION ``` ```` ````{py:attribute} EXTENSION :canonical: pyirk.core.SType.EXTENSION :value: > 1 ```{autodoc2-docstring} pyirk.core.SType.EXTENSION ``` ```` ````{py:attribute} UNDEFINED :canonical: pyirk.core.SType.UNDEFINED :value: > 2 ```{autodoc2-docstring} pyirk.core.SType.UNDEFINED ``` ```` ````` `````{py:class} VType(*args, **kwds) :canonical: pyirk.core.VType Bases: {py:obj}`enum.Enum` ```{autodoc2-docstring} pyirk.core.VType ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.VType.__init__ ``` ````{py:attribute} LITERAL :canonical: pyirk.core.VType.LITERAL :value: > 0 ```{autodoc2-docstring} pyirk.core.VType.LITERAL ``` ```` ````{py:attribute} ENTITY :canonical: pyirk.core.VType.ENTITY :value: > 1 ```{autodoc2-docstring} pyirk.core.VType.ENTITY ``` ```` ````{py:attribute} LIST :canonical: pyirk.core.VType.LIST :value: > 2 ```{autodoc2-docstring} pyirk.core.VType.LIST ``` ```` ````{py:attribute} DICT :canonical: pyirk.core.VType.DICT :value: > 3 ```{autodoc2-docstring} pyirk.core.VType.DICT ``` ```` ````` `````{py:class} ProcessedStmtKey :canonical: pyirk.core.ProcessedStmtKey ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey ``` ````{py:attribute} short_key :canonical: pyirk.core.ProcessedStmtKey.short_key :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.short_key ``` ```` ````{py:attribute} etype :canonical: pyirk.core.ProcessedStmtKey.etype :type: pyirk.core.EType :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.etype ``` ```` ````{py:attribute} stype :canonical: pyirk.core.ProcessedStmtKey.stype :type: pyirk.core.SType :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.stype ``` ```` ````{py:attribute} vtype :canonical: pyirk.core.ProcessedStmtKey.vtype :type: pyirk.core.VType :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.vtype ``` ```` ````{py:attribute} content :canonical: pyirk.core.ProcessedStmtKey.content :type: object :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.content ``` ```` ````{py:attribute} delimiter :canonical: pyirk.core.ProcessedStmtKey.delimiter :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.delimiter ``` ```` ````{py:attribute} label :canonical: pyirk.core.ProcessedStmtKey.label :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.label ``` ```` ````{py:attribute} prefix :canonical: pyirk.core.ProcessedStmtKey.prefix :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.prefix ``` ```` ````{py:attribute} uri :canonical: pyirk.core.ProcessedStmtKey.uri :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.uri ``` ```` ````{py:attribute} lang_indicator :canonical: pyirk.core.ProcessedStmtKey.lang_indicator :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.lang_indicator ``` ```` ````{py:attribute} original_key_str :canonical: pyirk.core.ProcessedStmtKey.original_key_str :type: str :value: > None ```{autodoc2-docstring} pyirk.core.ProcessedStmtKey.original_key_str ``` ```` ````` ````{py:function} unpack_l1d(l1d: typing.Dict[str, object]) :canonical: pyirk.core.unpack_l1d ```{autodoc2-docstring} pyirk.core.unpack_l1d ``` ```` ````{py:data} re_prefix_shortkey_suffix :canonical: pyirk.core.re_prefix_shortkey_suffix :value: > 'compile(...)' ```{autodoc2-docstring} pyirk.core.re_prefix_shortkey_suffix ``` ```` ````{py:data} re_suffix_underscore :canonical: pyirk.core.re_suffix_underscore :value: > 'compile(...)' ```{autodoc2-docstring} pyirk.core.re_suffix_underscore ``` ```` ````{py:data} re_suffix_square_brackets :canonical: pyirk.core.re_suffix_square_brackets :value: > 'compile(...)' ```{autodoc2-docstring} pyirk.core.re_suffix_square_brackets ``` ```` ````{py:function} process_key_str(key_str: str, check: bool = True, resolve_prefix: bool = True, mod_uri: str = None) -> pyirk.core.ProcessedStmtKey :canonical: pyirk.core.process_key_str ```{autodoc2-docstring} pyirk.core.process_key_str ``` ```` ````{py:function} _resolve_prefix(pr_key: pyirk.core.ProcessedStmtKey, passed_mod_uri: str = None) -> None :canonical: pyirk.core._resolve_prefix ```{autodoc2-docstring} pyirk.core._resolve_prefix ``` ```` ````{py:data} langcode_end_pattern :canonical: pyirk.core.langcode_end_pattern :value: > 'compile(...)' ```{autodoc2-docstring} pyirk.core.langcode_end_pattern ``` ```` ````{py:function} check_processed_key_label(pkey: pyirk.core.ProcessedStmtKey) -> None :canonical: pyirk.core.check_processed_key_label ```{autodoc2-docstring} pyirk.core.check_processed_key_label ``` ```` ````{py:function} ilk2nlk(ilk: str) -> str :canonical: pyirk.core.ilk2nlk ```{autodoc2-docstring} pyirk.core.ilk2nlk ``` ```` ````{py:function} u(key_str: str) -> str :canonical: pyirk.core.u ```{autodoc2-docstring} pyirk.core.u ``` ```` `````{py:class} Item(base_uri: str, key_str: str, **kwargs) :canonical: pyirk.core.Item Bases: {py:obj}`pyirk.core.Entity` ````{py:method} __repr__() :canonical: pyirk.core.Item.__repr__ ```` ````` ````{py:function} get_active_mod_uri(strict: bool = True) -> typing.Union[str, None] :canonical: pyirk.core.get_active_mod_uri ```{autodoc2-docstring} pyirk.core.get_active_mod_uri ``` ```` ````{py:function} process_kwargs_for_entity_creation(entity_key: str, kwargs: dict) -> tuple[dict, dict] :canonical: pyirk.core.process_kwargs_for_entity_creation ```{autodoc2-docstring} pyirk.core.process_kwargs_for_entity_creation ``` ```` `````{py:class} KWArgManager(entity_key: str, kwargs: dict) :canonical: pyirk.core.KWArgManager ```{autodoc2-docstring} pyirk.core.KWArgManager ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.KWArgManager.__init__ ``` ````{py:method} process() :canonical: pyirk.core.KWArgManager.process ```{autodoc2-docstring} pyirk.core.KWArgManager.process ``` ```` ````` `````{py:class} SingleKWArgProcessor(kwam: pyirk.core.KWArgManager, kwarg_name: str, kwarg_value: str) :canonical: pyirk.core.SingleKWArgProcessor ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor.__init__ ``` ````{py:method} handle_kwarg_stage1() :canonical: pyirk.core.SingleKWArgProcessor.handle_kwarg_stage1 ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor.handle_kwarg_stage1 ``` ```` ````{py:method} handle_kwarg_stage2() :canonical: pyirk.core.SingleKWArgProcessor.handle_kwarg_stage2 ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor.handle_kwarg_stage2 ``` ```` ````{py:method} dispatch_value_multiplicity_for_rk_with_lr() :canonical: pyirk.core.SingleKWArgProcessor.dispatch_value_multiplicity_for_rk_with_lr ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor.dispatch_value_multiplicity_for_rk_with_lr ``` ```` ````{py:method} handle_rk_with_lr(scalar_kwarg_value) :canonical: pyirk.core.SingleKWArgProcessor.handle_rk_with_lr ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor.handle_rk_with_lr ``` ```` ````{py:method} _handle_kwarg_for_functional_rel(scalar_kwarg_value) :canonical: pyirk.core.SingleKWArgProcessor._handle_kwarg_for_functional_rel ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor._handle_kwarg_for_functional_rel ``` ```` ````{py:method} _check_for_valid_language(scalar_kwarg_value, first_value=False) :canonical: pyirk.core.SingleKWArgProcessor._check_for_valid_language ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor._check_for_valid_language ``` ```` ````{py:method} _handle_value(kwarg_value, lang_related_value_list=None) -> rdflib.Literal :canonical: pyirk.core.SingleKWArgProcessor._handle_value ```{autodoc2-docstring} pyirk.core.SingleKWArgProcessor._handle_value ``` ```` ````` ````{py:function} process_lang_related_kwargs_for_entity_creation(entity: pyirk.core.Entity, short_key: str, lang_related_kwargs: dict) -> None :canonical: pyirk.core.process_lang_related_kwargs_for_entity_creation ```{autodoc2-docstring} pyirk.core.process_lang_related_kwargs_for_entity_creation ``` ```` ````{py:function} create_item(key_str: str = '', **kwargs) -> pyirk.core.Item :canonical: pyirk.core.create_item ```{autodoc2-docstring} pyirk.core.create_item ``` ```` `````{py:class} Relation(base_uri: str, short_key: str, **kwargs) :canonical: pyirk.core.Relation Bases: {py:obj}`pyirk.core.Entity` ````{py:method} __repr__() :canonical: pyirk.core.Relation.__repr__ ```` ````` `````{py:class} RelationRole(*args, **kwds) :canonical: pyirk.core.RelationRole Bases: {py:obj}`enum.Enum` ```{autodoc2-docstring} pyirk.core.RelationRole ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.RelationRole.__init__ ``` ````{py:attribute} SUBJECT :canonical: pyirk.core.RelationRole.SUBJECT :value: > 0 ```{autodoc2-docstring} pyirk.core.RelationRole.SUBJECT ``` ```` ````{py:attribute} PREDICATE :canonical: pyirk.core.RelationRole.PREDICATE :value: > 1 ```{autodoc2-docstring} pyirk.core.RelationRole.PREDICATE ``` ```` ````{py:attribute} OBJECT :canonical: pyirk.core.RelationRole.OBJECT :value: > 2 ```{autodoc2-docstring} pyirk.core.RelationRole.OBJECT ``` ```` ````` ````{py:data} VALID_HOOK_PHASES :canonical: pyirk.core.VALID_HOOK_PHASES :value: > ['post-create', 'post-finalize'] ```{autodoc2-docstring} pyirk.core.VALID_HOOK_PHASES ``` ```` ````{py:data} VALID_HOOK_TYPES :canonical: pyirk.core.VALID_HOOK_TYPES :value: > ['post-create-entity', 'post-create-item', 'post-create-relation', 'post-finalize-entity', 'post-fin... ```{autodoc2-docstring} pyirk.core.VALID_HOOK_TYPES ``` ```` ````{py:function} run_hooks(entity: pyirk.core.Entity, phase: str) -> None :canonical: pyirk.core.run_hooks ```{autodoc2-docstring} pyirk.core.run_hooks ``` ```` ````{py:function} register_hook(type_str: str, func: callable) -> None :canonical: pyirk.core.register_hook ```{autodoc2-docstring} pyirk.core.register_hook ``` ```` `````{py:class} KeyManager(minval=1000, maxval=99999, keyseed=None) :canonical: pyirk.core.KeyManager ```{autodoc2-docstring} pyirk.core.KeyManager ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.KeyManager.__init__ ``` ````{py:method} pop(index: int = -1) -> int :canonical: pyirk.core.KeyManager.pop ```{autodoc2-docstring} pyirk.core.KeyManager.pop ``` ```` ````{py:method} _generate_key_numbers() -> None :canonical: pyirk.core.KeyManager._generate_key_numbers ```{autodoc2-docstring} pyirk.core.KeyManager._generate_key_numbers ``` ```` ````` ````{py:function} pop_uri_based_key(prefix: typing.Optional[str] = None, prefix2: str = '') -> typing.Union[int, str] :canonical: pyirk.core.pop_uri_based_key ```{autodoc2-docstring} pyirk.core.pop_uri_based_key ``` ```` ````{py:function} repl_spc_by_udsc(txt: str) -> str :canonical: pyirk.core.repl_spc_by_udsc ```{autodoc2-docstring} pyirk.core.repl_spc_by_udsc ``` ```` `````{py:class} RawQualifier(rel: pyirk.core.Relation, obj: typing.Union[rdflib.Literal, pyirk.core.Entity]) :canonical: pyirk.core.RawQualifier ```{autodoc2-docstring} pyirk.core.RawQualifier ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.RawQualifier.__init__ ``` ````{py:method} __repr__() :canonical: pyirk.core.RawQualifier.__repr__ ```` ````` `````{py:class} QualifierFactory(relation: pyirk.core.Relation, registry_name: typing.Optional[str] = None) :canonical: pyirk.core.QualifierFactory ```{autodoc2-docstring} pyirk.core.QualifierFactory ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.QualifierFactory.__init__ ``` ````{py:method} __call__(obj) :canonical: pyirk.core.QualifierFactory.__call__ ```{autodoc2-docstring} pyirk.core.QualifierFactory.__call__ ``` ```` ````` `````{py:class} Statement(relation: pyirk.core.Relation = None, relation_tuple: tuple = None, role: pyirk.core.RelationRole = None, corresponding_entity: pyirk.core.Entity = None, corresponding_literal=None, scope=None, qualifiers: typing.Optional[typing.Union[typing.List[pyirk.core.RawQualifier], typing.List[pyirk.core.QualifierStatement]]] = None, proxyitem: typing.Optional[pyirk.core.Item] = None) :canonical: pyirk.core.Statement ```{autodoc2-docstring} pyirk.core.Statement ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.Statement.__init__ ``` ````{py:property} key_str :canonical: pyirk.core.Statement.key_str ```{autodoc2-docstring} pyirk.core.Statement.key_str ``` ```` ````{py:method} __repr__() :canonical: pyirk.core.Statement.__repr__ ```` ````{py:method} _process_qualifiers(qlist: typing.Union[typing.List[pyirk.core.RawQualifier], typing.List[pyirk.core.QualifierStatement]], scope: typing.Optional[pyirk.core.Entity] = None) -> None :canonical: pyirk.core.Statement._process_qualifiers ```{autodoc2-docstring} pyirk.core.Statement._process_qualifiers ``` ```` ````{py:method} is_qualifier() :canonical: pyirk.core.Statement.is_qualifier ```{autodoc2-docstring} pyirk.core.Statement.is_qualifier ``` ```` ````{py:method} get_first_qualifier_obj_with_rel(key=None, uri=None, tolerate_key_error=False) :canonical: pyirk.core.Statement.get_first_qualifier_obj_with_rel ```{autodoc2-docstring} pyirk.core.Statement.get_first_qualifier_obj_with_rel ``` ```` ````{py:method} unlink(*args) -> None :canonical: pyirk.core.Statement.unlink ```{autodoc2-docstring} pyirk.core.Statement.unlink ``` ```` ````` ```{py:class} QualifierStatement(*args, **kwargs) :canonical: pyirk.core.QualifierStatement Bases: {py:obj}`pyirk.core.Statement` ``` ````{py:function} tolerant_removal(sequence, element) :canonical: pyirk.core.tolerant_removal ```{autodoc2-docstring} pyirk.core.tolerant_removal ``` ```` ````{py:function} create_relation(key_str: str = '', **kwargs) -> pyirk.core.Relation :canonical: pyirk.core.create_relation ```{autodoc2-docstring} pyirk.core.create_relation ``` ```` ````{py:function} create_builtin_item(*args, **kwargs) -> pyirk.core.Item :canonical: pyirk.core.create_builtin_item ```{autodoc2-docstring} pyirk.core.create_builtin_item ``` ```` ````{py:function} create_builtin_relation(*args, **kwargs) -> pyirk.core.Relation :canonical: pyirk.core.create_builtin_relation ```{autodoc2-docstring} pyirk.core.create_builtin_relation ``` ```` ````{py:function} generate_new_key(prefix, prefix2='', mod_uri=None) :canonical: pyirk.core.generate_new_key ```{autodoc2-docstring} pyirk.core.generate_new_key ``` ```` ````{py:function} print_new_keys(n=30, loaded_mod=None) :canonical: pyirk.core.print_new_keys ```{autodoc2-docstring} pyirk.core.print_new_keys ``` ```` ````{py:function} get_caller_frame(upcount: int) -> types.FrameType :canonical: pyirk.core.get_caller_frame ```{autodoc2-docstring} pyirk.core.get_caller_frame ``` ```` ````{py:function} get_key_str_by_inspection(upcount=1) -> str :canonical: pyirk.core.get_key_str_by_inspection ```{autodoc2-docstring} pyirk.core.get_key_str_by_inspection ``` ```` ````{py:function} get_mod_name_by_inspection(upcount=1) :canonical: pyirk.core.get_mod_name_by_inspection ```{autodoc2-docstring} pyirk.core.get_mod_name_by_inspection ``` ```` ````{py:function} get_mod_id_list_by_inspection(upcount=2) -> list :canonical: pyirk.core.get_mod_id_list_by_inspection ```{autodoc2-docstring} pyirk.core.get_mod_id_list_by_inspection ``` ```` ````{py:class} Context(*args, **kwargs) :canonical: pyirk.core.Context ```{autodoc2-docstring} pyirk.core.Context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.Context.__init__ ``` ```` ````{py:data} _uri_stack :canonical: pyirk.core._uri_stack :value: > [] ```{autodoc2-docstring} pyirk.core._uri_stack ``` ```` ````{py:data} _search_uri_stack :canonical: pyirk.core._search_uri_stack :value: > [] ```{autodoc2-docstring} pyirk.core._search_uri_stack ``` ```` `````{py:class} abstract_uri_context(uri_stack: list, uri: str, prefix: str = None) :canonical: pyirk.core.abstract_uri_context ```{autodoc2-docstring} pyirk.core.abstract_uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.abstract_uri_context.__init__ ``` ````{py:method} __enter__() :canonical: pyirk.core.abstract_uri_context.__enter__ ```{autodoc2-docstring} pyirk.core.abstract_uri_context.__enter__ ``` ```` ````{py:method} __exit__(exc_type, exc_val, exc_tb) :canonical: pyirk.core.abstract_uri_context.__exit__ ```{autodoc2-docstring} pyirk.core.abstract_uri_context.__exit__ ``` ```` ````` ````{py:class} uri_context(uri: str, prefix: str = None) :canonical: pyirk.core.uri_context Bases: {py:obj}`pyirk.core.abstract_uri_context` ```{autodoc2-docstring} pyirk.core.uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.uri_context.__init__ ``` ```` ````{py:class} search_uri_context(uri: str, prefix: str = None) :canonical: pyirk.core.search_uri_context Bases: {py:obj}`pyirk.core.abstract_uri_context` ```{autodoc2-docstring} pyirk.core.search_uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.search_uri_context.__init__ ``` ```` ````{py:function} unload_mod(mod_uri: str, strict=True) -> None :canonical: pyirk.core.unload_mod ```{autodoc2-docstring} pyirk.core.unload_mod ``` ```` ````{py:function} _unlink_entity(uri: str, remove_from_mod=False) -> None :canonical: pyirk.core._unlink_entity ```{autodoc2-docstring} pyirk.core._unlink_entity ``` ```` ````{py:function} replace_and_unlink_entity(old_entity: pyirk.core.Entity, new_entity: pyirk.core.Entity) :canonical: pyirk.core.replace_and_unlink_entity ```{autodoc2-docstring} pyirk.core.replace_and_unlink_entity ``` ```` ````{py:function} register_mod(uri: str, keymanager: pyirk.core.KeyManager = None, check_uri=True, prefix=None) :canonical: pyirk.core.register_mod ```{autodoc2-docstring} pyirk.core.register_mod ``` ```` ````{py:function} start_mod(uri) :canonical: pyirk.core.start_mod ```{autodoc2-docstring} pyirk.core.start_mod ``` ```` ````{py:function} end_mod() :canonical: pyirk.core.end_mod ```{autodoc2-docstring} pyirk.core.end_mod ``` ```` ````{py:function} get_language_of_str_literal(obj: typing.Union[str, rdflib.Literal]) :canonical: pyirk.core.get_language_of_str_literal ```{autodoc2-docstring} pyirk.core.get_language_of_str_literal ``` ```` `````{py:class} LanguageCode(langtag) :canonical: pyirk.core.LanguageCode ```{autodoc2-docstring} pyirk.core.LanguageCode ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.LanguageCode.__init__ ``` ````{py:method} __rmatmul__(arg: str) -> rdflib.Literal :canonical: pyirk.core.LanguageCode.__rmatmul__ ```{autodoc2-docstring} pyirk.core.LanguageCode.__rmatmul__ ``` ```` ````` ````{py:data} df :canonical: pyirk.core.df :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.df ``` ```` ````{py:data} en :canonical: pyirk.core.en :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.en ``` ```` ````{py:data} de :canonical: pyirk.core.de :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.de ``` ```` ````{py:data} fr :canonical: pyirk.core.fr :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.fr ``` ```` ````{py:data} it :canonical: pyirk.core.it :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.it ``` ```` ````{py:data} es :canonical: pyirk.core.es :value: > 'LanguageCode(...)' ```{autodoc2-docstring} pyirk.core.es ``` ```` `````{py:class} RuleResult() :canonical: pyirk.core.RuleResult ```{autodoc2-docstring} pyirk.core.RuleResult ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk.core.RuleResult.__init__ ``` ````{py:method} add_statement(stm: pyirk.core.Statement) :canonical: pyirk.core.RuleResult.add_statement ```{autodoc2-docstring} pyirk.core.RuleResult.add_statement ``` ```` ````{py:method} add_statements(stms: typing.List[pyirk.core.Statement]) :canonical: pyirk.core.RuleResult.add_statements ```{autodoc2-docstring} pyirk.core.RuleResult.add_statements ``` ```` ````{py:method} add_entity(entity: pyirk.core.Entity) :canonical: pyirk.core.RuleResult.add_entity ```{autodoc2-docstring} pyirk.core.RuleResult.add_entity ``` ```` ````{py:method} extend(part: pyirk.core.RuleResult) :canonical: pyirk.core.RuleResult.extend ```{autodoc2-docstring} pyirk.core.RuleResult.extend ``` ```` ````{py:method} add_partial(part: pyirk.core.RuleResult) :canonical: pyirk.core.RuleResult.add_partial ```{autodoc2-docstring} pyirk.core.RuleResult.add_partial ``` ```` ````{py:method} __repr__() :canonical: pyirk.core.RuleResult.__repr__ ```` ````{py:property} rule :canonical: pyirk.core.RuleResult.rule ```{autodoc2-docstring} pyirk.core.RuleResult.rule ``` ```` ````` ````{py:function} is_true(subject: pyirk.core.Entity, predicate: pyirk.core.Relation, object) -> tuple[bool, None] :canonical: pyirk.core.is_true ```{autodoc2-docstring} pyirk.core.is_true ``` ```` ````{py:function} format_entity_html(e: pyirk.core.Entity) :canonical: pyirk.core.format_entity_html ```{autodoc2-docstring} pyirk.core.format_entity_html ``` ```` ````{py:function} format_literal_html(obj) :canonical: pyirk.core.format_literal_html ```{autodoc2-docstring} pyirk.core.format_literal_html ``` ```` ````{py:function} script_main(fpath) :canonical: pyirk.core.script_main ```{autodoc2-docstring} pyirk.core.script_main ``` ```` ````{py:function} is_subclass(item: pyirk.core.Item, parent_item: pyirk.core.Item) :canonical: pyirk.core.is_subclass ```{autodoc2-docstring} pyirk.core.is_subclass ``` ```` ````{py:function} is_instance(item: pyirk.core.Item, parent_item: pyirk.core.Item) :canonical: pyirk.core.is_instance ```{autodoc2-docstring} pyirk.core.is_instance ``` ```` ````{py:function} is_subproperty(item: pyirk.core.Item, parent_property: pyirk.core.Item) :canonical: pyirk.core.is_subproperty ```{autodoc2-docstring} pyirk.core.is_subproperty ``` ````