All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.jupyter.parser.notebook.JupyterNotebook.kt Maven / Gradle / Ivy

There is a newer version: 0.2.0-dev-10
Show newest version
package org.jetbrains.jupyter.parser.notebook

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
public data class JupyterNotebook(
    /** Notebook root-level metadata. */
    val metadata: Metadata,
    /** Notebook format (minor number). Incremented for backward compatible changes to the notebook format. */
    @SerialName("nbformat_minor")
    val nbformatMinor: Long,
    /** Notebook format (major number). Incremented between backwards incompatible changes to the notebook format. */
    val nbformat: Int,
    /** Array of cells of the current notebook. */
    val cells: List
) {

    init {
        require(nbformatMinor >= 0L) { "nbformatMinor < minimum 0 - $nbformatMinor" }
        require(nbformat in 4..4) { "nbformat not in range 4..4 - $nbformat" }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy