{ } Raw JSON

bundles / nbformat latest / nbformat / reader / reads

function

nbformat.reader:reads

source: /nbformat/reader.py:49

Signature

def reads(s, **kwargs)

Summary

Read a notebook from a json string and return the NotebookNode object.

Extended Summary

This function properly reads notebooks of any version. No version conversion is performed.

Parameters

s : unicode | bytes

The raw string or bytes object to read the notebook from.

Returns

nb : NotebookNode

The notebook that was read.

Raises

: ValidationError

Notebook JSON for a given version is missing an expected key and cannot be read.

: NBFormatError

Specified major version is invalid or unsupported.

Aliases

  • nbformat.reader.reads