nbproject.dev.Notebook

class nbproject.dev.Notebook(**data)

Bases: BaseModel

Jupyter notebook model.

Attributes

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property model_extra: dict[str, Any] | None

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to "allow".

model_fields: ClassVar[dict[str, FieldInfo]] = {'cells': FieldInfo(annotation=list, required=True), 'metadata': FieldInfo(annotation=dict, required=True), 'nbformat': FieldInfo(annotation=int, required=True), 'nbformat_minor': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

Methods