org.jetbrains.kotlinx.jupyter.api.libraries.Constructing.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-api Show documentation
Show all versions of kotlin-jupyter-api Show documentation
API for libraries supporting Kotlin Jupyter notebooks
package org.jetbrains.kotlinx.jupyter.api.libraries
import org.jetbrains.kotlinx.jupyter.api.Notebook
fun createLibrary(
notebook: Notebook,
builder: JupyterIntegration.Builder.() -> Unit,
): LibraryDefinition {
val o =
object : JupyterIntegration() {
override fun Builder.onLoaded() {
builder()
}
}
return o.getDefinitions(notebook).single()
}