org.jetbrains.kotlinx.jupyter.api.session.JupyterSessionInfo.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.session
import java.util.ServiceLoader
object JupyterSessionInfo {
private val loader = ServiceLoader.load(JupyterSessionProvider::class.java)
fun isRunWithKernel(): Boolean {
val provider = loader.firstOrNull()
return provider != null
}
}