# {py:mod}`pyirk._core.context` ```{py:module} pyirk._core.context ``` ```{autodoc2-docstring} pyirk._core.context :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Context ` - ```{autodoc2-docstring} pyirk._core.context.Context :summary: ``` * - {py:obj}`abstract_uri_context ` - ```{autodoc2-docstring} pyirk._core.context.abstract_uri_context :summary: ``` * - {py:obj}`uri_context ` - ```{autodoc2-docstring} pyirk._core.context.uri_context :summary: ``` * - {py:obj}`search_uri_context ` - ```{autodoc2-docstring} pyirk._core.context.search_uri_context :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`get_caller_frame ` - ```{autodoc2-docstring} pyirk._core.context.get_caller_frame :summary: ``` * - {py:obj}`get_key_str_by_inspection ` - ```{autodoc2-docstring} pyirk._core.context.get_key_str_by_inspection :summary: ``` * - {py:obj}`get_mod_name_by_inspection ` - ```{autodoc2-docstring} pyirk._core.context.get_mod_name_by_inspection :summary: ``` * - {py:obj}`get_mod_id_list_by_inspection ` - ```{autodoc2-docstring} pyirk._core.context.get_mod_id_list_by_inspection :summary: ``` * - {py:obj}`get_active_mod_uri ` - ```{autodoc2-docstring} pyirk._core.context.get_active_mod_uri :summary: ``` * - {py:obj}`register_mod ` - ```{autodoc2-docstring} pyirk._core.context.register_mod :summary: ``` * - {py:obj}`start_mod ` - ```{autodoc2-docstring} pyirk._core.context.start_mod :summary: ``` * - {py:obj}`end_mod ` - ```{autodoc2-docstring} pyirk._core.context.end_mod :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`__all__ ` - ```{autodoc2-docstring} pyirk._core.context.__all__ :summary: ``` ```` ### API ````{py:data} __all__ :canonical: pyirk._core.context.__all__ :value: > ['get_caller_frame', 'get_key_str_by_inspection', 'get_mod_name_by_inspection', 'get_mod_id_list_by_... ```{autodoc2-docstring} pyirk._core.context.__all__ ``` ```` ````{py:function} get_caller_frame(upcount: int) -> types.FrameType :canonical: pyirk._core.context.get_caller_frame ```{autodoc2-docstring} pyirk._core.context.get_caller_frame ``` ```` ````{py:function} get_key_str_by_inspection(upcount=1) -> str :canonical: pyirk._core.context.get_key_str_by_inspection ```{autodoc2-docstring} pyirk._core.context.get_key_str_by_inspection ``` ```` ````{py:function} get_mod_name_by_inspection(upcount=1) :canonical: pyirk._core.context.get_mod_name_by_inspection ```{autodoc2-docstring} pyirk._core.context.get_mod_name_by_inspection ``` ```` ````{py:function} get_mod_id_list_by_inspection(upcount=2) -> list :canonical: pyirk._core.context.get_mod_id_list_by_inspection ```{autodoc2-docstring} pyirk._core.context.get_mod_id_list_by_inspection ``` ```` ````{py:class} Context(*args, **kwargs) :canonical: pyirk._core.context.Context ```{autodoc2-docstring} pyirk._core.context.Context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk._core.context.Context.__init__ ``` ```` `````{py:class} abstract_uri_context(uri_stack: list, uri: str, prefix: str = None) :canonical: pyirk._core.context.abstract_uri_context ```{autodoc2-docstring} pyirk._core.context.abstract_uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk._core.context.abstract_uri_context.__init__ ``` ````{py:method} __enter__() :canonical: pyirk._core.context.abstract_uri_context.__enter__ ```{autodoc2-docstring} pyirk._core.context.abstract_uri_context.__enter__ ``` ```` ````{py:method} __exit__(exc_type, exc_val, exc_tb) :canonical: pyirk._core.context.abstract_uri_context.__exit__ ```{autodoc2-docstring} pyirk._core.context.abstract_uri_context.__exit__ ``` ```` ````` ````{py:class} uri_context(uri: str, prefix: str = None) :canonical: pyirk._core.context.uri_context Bases: {py:obj}`pyirk._core.context.abstract_uri_context` ```{autodoc2-docstring} pyirk._core.context.uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk._core.context.uri_context.__init__ ``` ```` ````{py:class} search_uri_context(uri: str, prefix: str = None) :canonical: pyirk._core.context.search_uri_context Bases: {py:obj}`pyirk._core.context.abstract_uri_context` ```{autodoc2-docstring} pyirk._core.context.search_uri_context ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} pyirk._core.context.search_uri_context.__init__ ``` ```` ````{py:function} get_active_mod_uri(strict: bool = True) -> typing.Union[str, None] :canonical: pyirk._core.context.get_active_mod_uri ```{autodoc2-docstring} pyirk._core.context.get_active_mod_uri ``` ```` ````{py:function} register_mod(uri: str, keymanager: pyirk._core.keymanager.KeyManager = None, check_uri=True, prefix=None) :canonical: pyirk._core.context.register_mod ```{autodoc2-docstring} pyirk._core.context.register_mod ``` ```` ````{py:function} start_mod(uri) :canonical: pyirk._core.context.start_mod ```{autodoc2-docstring} pyirk._core.context.start_mod ``` ```` ````{py:function} end_mod() :canonical: pyirk._core.context.end_mod ```{autodoc2-docstring} pyirk._core.context.end_mod ``` ````