sdkagent

nbformat API reference

121 public APIs from nbformat (jupyter/nbformat) — 37 classes, 35 functions, 49 methods. Signatures extracted by static analysis of the actual source.

Repository: jupyter/nbformat

KindCount
Classes37
Functions35
Methods49

API list

classnbformat._struct.Struct
A dict subclass with attribute style access.
methodnbformat._struct.Struct.copy()
Return a copy as a Struct.
methodnbformat._struct.Struct.dict()
Get the dict representation of the struct.
methodnbformat._struct.Struct.hasattr(key)
hasattr function available as a method.
funcnbformat.corpus.words.generate_corpus_id()
Generate a corpus id.
classnbformat.current.NBFormatError
An error raised for an nbformat error.
funcnbformat.current.reads_json(nbjson, **kwargs)
DEPRECATED, use reads
funcnbformat.current.reads_py(s, **kwargs)
DEPRECATED: use nbconvert
funcnbformat.current.writes_json(nb, **kwargs)
DEPRECATED, use writes
funcnbformat.current.writes_py(nb, **kwargs)
DEPRECATED: use nbconvert
classnbformat.json_compat.FastJsonSchemaValidator
A schema validator using fastjsonschema.
methodnbformat.json_compat.FastJsonSchemaValidator.validate(data)
Validate incoming data.
classnbformat.json_compat.JsonSchemaValidator
A json schema validator.
methodnbformat.json_compat.JsonSchemaValidator.validate(data)
Validate incoming data.
classnbformat.notebooknode.NotebookNode
A dict-like node with attribute-access
classnbformat.reader.NotJSONError
An error raised when an object is not valid JSON.
funcnbformat.reader.get_version(nb)
Get the version of a notebook.
funcnbformat.reader.parse_json(s, **kwargs)
Parse a JSON string into a dict.
classnbformat.sentinel.Sentinel
Sentinel class for constants with useful reprs
classnbformat.sign.MemorySignatureStore
Non-persistent storage of signatures in memory.
methodnbformat.sign.MemorySignatureStore.check_signature(digest, algorithm)
Check a signature.
methodnbformat.sign.MemorySignatureStore.remove_signature(digest, algorithm)
Remove a signature.
methodnbformat.sign.MemorySignatureStore.store_signature(digest, algorithm)
Store a signature.
classnbformat.sign.NotebookNotary
A class for computing and verifying notebook signatures.
methodnbformat.sign.NotebookNotary.close()
Close the notary's signature store.
classnbformat.sign.SQLiteSignatureStore
Store signatures in an SQLite database.
methodnbformat.sign.SQLiteSignatureStore.close()
Close the db.
methodnbformat.sign.SQLiteSignatureStore.init_db(db)
Initialize the db.
methodnbformat.sign.SQLiteSignatureStore.store_signature(digest, algorithm)
Store a signature in the db.
classnbformat.sign.SignatureStore
Base class for a signature store.
methodnbformat.sign.SignatureStore.close()
Close any open connections this store may use.
classnbformat.sign.TrustNotebookApp
An application for handling notebook trust.
methodnbformat.sign.TrustNotebookApp.generate_new_key()
Generate a new notebook signature key
methodnbformat.sign.TrustNotebookApp.sign_notebook(nb, notebook_path='<stdin>')
Sign a notebook that's been loaded
methodnbformat.sign.TrustNotebookApp.start()
Start the trust notebook app.
funcnbformat.v1.convert.upgrade(nb, orig_version=None)
Upgrade a notebook.
classnbformat.v1.nbbase.NotebookNode
A notebook node object.
funcnbformat.v1.nbbase.from_dict(d)
Create notebook node(s) from an object.
funcnbformat.v1.nbbase.new_text_cell(text=None)
Create a new text cell.
classnbformat.v1.nbjson.JSONReader
A JSON notebook reader.
methodnbformat.v1.nbjson.JSONReader.reads(s, **kwargs)
Convert a string to a notebook object.
classnbformat.v1.nbjson.JSONWriter
A JSON notebook writer.
methodnbformat.v1.nbjson.JSONWriter.writes(nb, **kwargs)
Convert a notebook object to a string.
classnbformat.v1.rwbase.NotebookReader
The base notebook reader.
methodnbformat.v1.rwbase.NotebookReader.reads(s, **kwargs)
Read a notebook from a string.
classnbformat.v1.rwbase.NotebookWriter
The base notebook writer.
methodnbformat.v1.rwbase.NotebookWriter.write(nb, fp, **kwargs)
Write a notebook to a file like object
methodnbformat.v1.rwbase.NotebookWriter.writes(nb, **kwargs)
Write a notebook to a string.
funcnbformat.v2.convert.downgrade(nb)
Convert a v2 notebook to v1.
funcnbformat.v2.convert.upgrade(nb, from_version=1)
Convert a notebook to the v2 format.
classnbformat.v2.nbbase.NotebookNode
A notebook node object.
funcnbformat.v2.nbbase.from_dict(d)
Create notebook node(s) from a value.
funcnbformat.v2.nbbase.new_author(name=None, email=None, affiliation=None, url=None)
Create a new author.
funcnbformat.v2.nbbase.new_text_cell(cell_type, source=None, rendered=None)
Create a new text cell.
methodnbformat.v2.nbjson.BytesEncoder.default(obj)
The default value of an object.
classnbformat.v2.nbjson.JSONReader
A JSON notebook reader.
methodnbformat.v2.nbjson.JSONReader.reads(s, **kwargs)
Convert a string to a notebook.
methodnbformat.v2.nbjson.JSONReader.to_notebook(d, **kwargs)
Convert a string to a notebook.
classnbformat.v2.nbjson.JSONWriter
A JSON notebook writer.
methodnbformat.v2.nbjson.JSONWriter.writes(nb, **kwargs)
Convert a notebook object to a string.
classnbformat.v2.nbpy.PyReader
A Python notebook reader.
methodnbformat.v2.nbpy.PyReader.new_cell(state, lines)
Create a new cell.
methodnbformat.v2.nbpy.PyReader.reads(s, **kwargs)
Convert a string to a notebook.
methodnbformat.v2.nbpy.PyReader.split_lines_into_blocks(lines)
Split lines into code blocks.
methodnbformat.v2.nbpy.PyReader.to_notebook(s, **kwargs)
Convert a string to a notebook.
classnbformat.v2.nbpy.PyReaderError
An error raised by the PyReader.
classnbformat.v2.nbpy.PyWriter
A Python notebook writer.
methodnbformat.v2.nbpy.PyWriter.writes(nb, **kwargs)
Convert a notebook object to a string.
funcnbformat.v2.nbxml.read(fp, **kwargs)
REMOVED
funcnbformat.v2.nbxml.reads(s, **kwargs)
REMOVED
funcnbformat.v2.nbxml.to_notebook(root, **kwargs)
REMOVED
funcnbformat.v2.parse_filename(fname)
Parse a notebook filename.
classnbformat.v2.rwbase.NotebookReader
A class for reading notebooks.
methodnbformat.v2.rwbase.NotebookReader.reads(s, **kwargs)
Read a notebook from a string.
classnbformat.v2.rwbase.NotebookWriter
A class for writing notebooks.
methodnbformat.v2.rwbase.NotebookWriter.write(nb, fp, **kwargs)
Write a notebook to a file like object
methodnbformat.v2.rwbase.NotebookWriter.writes(nb, **kwargs)
Write a notebook to a string.
funcnbformat.v3.convert.downgrade(nb)
Convert a v3 notebook to v2.
funcnbformat.v3.convert.raw_to_md(cell)
let raw passthrough as markdown
funcnbformat.v3.convert.upgrade(nb, from_version=2, from_minor=0)
Convert a notebook to v3.
classnbformat.v3.nbbase.NotebookNode
A notebook node object.
funcnbformat.v3.nbbase.cast_str(obj)
Cast an object as a string.
funcnbformat.v3.nbbase.from_dict(d)
Create notebook node(s) from an object.
funcnbformat.v3.nbbase.new_author(name=None, email=None, affiliation=None, url=None)
Create a new author.
funcnbformat.v3.nbbase.new_text_cell(cell_type, source=None, rendered=None, metadata=None)
Create a new text cell.
methodnbformat.v3.nbjson.BytesEncoder.default(obj)
Get the default value of an object.
classnbformat.v3.nbjson.JSONReader
A JSON notebook reader.
methodnbformat.v3.nbjson.JSONReader.reads(s, **kwargs)
Convert a string to a notebook.
methodnbformat.v3.nbjson.JSONReader.to_notebook(d, **kwargs)
Convert a dict to a notebook.
classnbformat.v3.nbjson.JSONWriter
A JSON notebook writer.
methodnbformat.v3.nbjson.JSONWriter.writes(nb, **kwargs)
Convert a notebook to a string.
classnbformat.v3.nbpy.PyReader
A python notebook reader.
methodnbformat.v3.nbpy.PyReader.new_cell(state, lines, **kwargs)
Create a new cell.
methodnbformat.v3.nbpy.PyReader.reads(s, **kwargs)
Convert a string to a notebook
methodnbformat.v3.nbpy.PyReader.split_lines_into_blocks(lines)
Split lines into code blocks.
methodnbformat.v3.nbpy.PyReader.to_notebook(s, **kwargs)
Convert a string to a notebook
classnbformat.v3.nbpy.PyReaderError
An error raised for a pyreader error.
classnbformat.v3.nbpy.PyWriter
A Python notebook writer.
methodnbformat.v3.nbpy.PyWriter.writes(nb, **kwargs)
Convert a notebook to a string.
funcnbformat.v3.parse_filename(fname)
Parse a notebook filename.
classnbformat.v3.rwbase.NotebookReader
A class for reading notebooks.
methodnbformat.v3.rwbase.NotebookReader.reads(s, **kwargs)
Read a notebook from a string.
classnbformat.v3.rwbase.NotebookWriter
A class for writing notebooks.
methodnbformat.v3.rwbase.NotebookWriter.write(nb, fp, **kwargs)
Write a notebook to a file like object
methodnbformat.v3.rwbase.NotebookWriter.writes(nb, **kwargs)
Write a notebook to a string.
funcnbformat.v4.convert.downgrade(nb)
Convert a v4 notebook to v3.
funcnbformat.v4.convert.upgrade(nb, from_version=None, from_minor=None)
Convert a notebook to latest v4.
funcnbformat.v4.nbbase.new_code_cell(source='', **kwargs)
Create a new code cell
funcnbformat.v4.nbbase.new_markdown_cell(source='', **kwargs)
Create a new markdown cell
funcnbformat.v4.nbbase.new_notebook(**kwargs)
Create a new notebook
funcnbformat.v4.nbbase.new_raw_cell(source='', **kwargs)
Create a new raw cell
funcnbformat.v4.nbbase.validate(node, ref=None)
validate a v4 node
methodnbformat.v4.nbjson.BytesEncoder.default(obj)
Get the default value of an object.
classnbformat.v4.nbjson.JSONReader
A JSON notebook reader.
classnbformat.v4.nbjson.JSONWriter
A JSON notebook writer.
classnbformat.v4.rwbase.NotebookReader
A class for reading notebooks.
methodnbformat.v4.rwbase.NotebookReader.reads(s, **kwargs)
Read a notebook from a string.
classnbformat.v4.rwbase.NotebookWriter
A class for writing notebooks.
methodnbformat.v4.rwbase.NotebookWriter.write(nb, fp, **kwargs)
Write a notebook to a file like object
methodnbformat.v4.rwbase.NotebookWriter.writes(nb, **kwargs)
Write a notebook to a string.
funcnbformat.validator.normalize(nbdict:Any, version:int | None=None, version_minor:int | None=None, *relax_add_props:bool=False, *strip_invalid_metadata:bool=False) -> tuple[int, Any]
Normalise a notebook prior to validation.

About this data

These signatures were extracted from the public source of jupyter/nbformat using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries