Debian Codegraph @

pyinstrument/__init__.py

raw symbols SCIP
1 import warnings
2
3 from pyinstrument.context_manager import profile
4 from pyinstrument.profiler import Profiler
5
6 __all__ = ["__version__", "Profiler", "load_ipython_extension", "profile"]
7 __version__ = "5.1.2"
8
9 # enable deprecation warnings
10 warnings.filterwarnings("once", ".*", DeprecationWarning, r"pyinstrument\..*")
11
12
13 def load_ipython_extension(ipython):
14 """
15 This function is called by IPython to load the pyinstrument IPython
16 extension, which is done with the magic command `%load_ext pyinstrument`.
17 """
18
19 from pyinstrument.magic import PyinstrumentMagic
20
21 ipython.register_magics(PyinstrumentMagic)