from IPython.display import display


# Running `npm run build` will create static resources in the static
# directory of this Python package (and create that directory if necessary).


def _jupyter_labextension_paths():
    return [{
        'name': '{{cookiecutter.extension_name}}',
        'src': 'static',
    }]

def _jupyter_nbextension_paths():
    return [{
        'section': 'notebook',
        'src': 'static',
        'dest': '{{cookiecutter.extension_name}}',
        'require': '{{cookiecutter.extension_name}}/extension'
    }]


# A display function that can be used within a notebook. E.g.:
#   from {{cookiecutter.extension_name}} import {{cookiecutter.mime_short_name}}
#   {{cookiecutter.mime_short_name}}(data)

def {{cookiecutter.mime_short_name}}(data):
    bundle = {
        '{{cookiecutter.mime_type}}': data,
        'application/json': data,
        'text/plain': '<{{cookiecutter.extension_name}}.{{cookiecutter.mime_short_name}} object>'
    }
    display(bundle, raw=True)

@@ -29,16 +29,28 @@
 display%0A
+import json%0A
 %0A%0A# Runn
@@ -849,16 +849,18 @@
 %0A       
+ #
  'applic
@@ -904,83 +904,34 @@
 n': 
-'%3C%7B%7Bcookiecutter.extension_name%7D%7D.%7B%7Bcookiecutter.mime_short_name%7D%7D object%3E'
+json.dumps(data, indent=4)
 %0A   

Output text representation of data in `text/plain`