bundles / nbformat 5.11.1 / nbformat / writes
function
nbformat:writes
source: /nbformat/__init__.py:104
Signature
def writes(nb, version = nbformat.NO_CONVERT, capture_validation_error = None, **kwargs)Summary
Write a notebook to a string in a given format in the given nbformat version.
Extended Summary
Any notebook format errors will be logged.
Parameters
nb: NotebookNodeThe notebook to write.
version: int, optionalThe nbformat version to write. If unspecified, or specified as nbformat.NO_CONVERT, the notebook's own version will be used and no conversion performed.
capture_validation_error: dict, optionalIf provided, a key of "ValidationError" with a value of the ValidationError instance will be added to the dictionary.
Returns
s: unicodeThe notebook as a JSON string.
Aliases
nbformat.writes