from ipykernel_helper import *
from pprint import pprintipykernel-helper
Helpers for ipykernel and friends
There’s not many helpers here yet!
Installation
Install latest from pypi
$ pip install ipykernel_helperHow to use
a = "hi"
b = dict(d='foo ' * 10)
def f(i:int): ..._vs,_fs = get_ipython().user_items(max_len=15)
print('--- vars')
pprint(_vs)
print('--- defs')
pprint(_fs)--- vars
{'IN_COLAB': 'False',
'IN_IPYTHON': 'False',
'IN_JUPYTER': 'False',
'IN_NOTEBOOK': 'False',
'Self': '<fastcore.basic…',
'UNSET': 'UNSET',
'a': 'hi',
'allow_imports': "{'PIL'}",
'arg0': '<fastcore.basic…',
'arg1': '<fastcore.basic…',
'arg2': '<fastcore.basic…',
'arg3': '<fastcore.basic…',
'arg4': '<fastcore.basic…',
'b': "{'d': 'foo foo …",
'custom_types': "{<class 'pathli…",
'defaults': 'namespace(cpus=…',
'dh_settings': "{'port': 5001}",
'flash': 'gemini/gemini-3…',
'inum_methods': "['__iadd__', '_…",
'mermaid_url': 'https://cdn.jsd…',
'null': '<fastcore.basic…',
'num_methods': "['__add__', '__…",
'o': 'PIL',
'prose_types': "{'pandas.DataFr…",
'python': '<safepyrun.core…',
'rnum_methods': "['__radd__', '_…",
'spark_chars': '▁▂▃▅▆▇',
'string_classes': "(<class 'str'>,…",
'type_map': "{'string': <cla…",
'valid_paths': "['.', '/tmp', '…"}
--- defs
{'aaiws_tree': "(path: str = '~/aai-ws', depth=3)",
'add_citations': '(content, anno)',
'f': '(i: int)',
'flash_search': "(pr, search='l')",
'flash_searches': "(prs: list[str], search: str = 'l')",
'tree': "(path='.', **kwargs)"}