jsonextended.parsers.ipynb module

class jsonextended.parsers.ipynb.NBParser[source]

Bases: object

Examples

>>> from jsonextended.utils import MockPath
>>> from jsonextended.edict import pprint
>>> fileobj = MockPath(is_file=True,
... content='''{
... "cells":[],
... "metadata":{}
... }'''
... )
>>> with fileobj.open() as f:
...     data = NBParser().read_file(f)
>>> pprint(data)
cells: []
metadata:
file_regex = '*.ipynb'
plugin_descript = 'read Jupyter Notebooks'
plugin_name = 'ipynb'
read_file(file_obj, **kwargs)[source]