Skip to main content

Embed and manage Jupyter Server as a reusable Python component for applications and tools.

Project description

apibean-jupyter

apibean-jupyter is an infrastructure library for embedding and managing a Jupyter Server as a reusable Python component.

Instead of treating Jupyter as a standalone application, apibean-jupyter allows you to launch, configure, and control a Jupyter Server programmatically, making it suitable for tools, GUIs, notebooks automation, and managed processes.


Why apibean-jupyter?

Jupyter is often started as a CLI tool (jupyter lab, jupyter server), which makes it difficult to:

  • Embed Jupyter inside another application
  • Manage its lifecycle from Python code
  • Integrate it with process managers or dashboards
  • Reuse the same configuration across tools

apibean-jupyter solves this by exposing Jupyter Server as a first-class Python object with a clear lifecycle and extension points.


Features

  • Embed Jupyter Server via a simple Python API
  • Optional CLI for quick launching
  • Clean separation between core logic and UI/tooling
  • Plugin hooks for customization (kernels, extensions, reporters)
  • Designed for uv run workflows and managed environments
  • No dependency on GUI frameworks

Installation

pip install apibean-jupyter

Or run it directly with uv:

uv run --with apibean-jupyter apibean-jupyter --root notebooks

Quick Start (Python API)

from apibean_jupyter import JupyterServer

server = JupyterServer(
    root_dir="notebooks",
    ip="127.0.0.1",
)

print("Starting Jupyter at:", server.url)
server.start()

Command Line Usage

apibean-jupyter --root notebooks

Show server information without starting:

apibean-jupyter --info

Using with uv run

apibean-jupyter is designed to work well with uv:

uv run --with apibean-jupyter apibean-jupyter --root notebooks

It can also be embedded into other tools that depend on it.


Extending via Plugins

apibean-jupyter provides a lightweight plugin system to hook into the server lifecycle:

  • Pre/post initialization
  • Pre/post server start
  • Shutdown handling

This allows you to implement features such as:

  • Kernel mapping
  • JupyterLab extension configuration
  • Metrics and reporting
  • Integration with process managers

Relationship to the apibean ecosystem

apibean-jupyter is part of the apibean ecosystem, a collection of libraries and tools focused on testability, automation, and developer tooling.

It is designed to be used alongside:

  • apibean-notebook – notebook automation and analysis
  • apibean-client – API and service interaction

Design Philosophy

  • Prefer composition over inheritance
  • Keep CLI logic thin and reusable
  • Avoid tight coupling with UI frameworks
  • Make production behavior explicit and reproducible

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apibean_jupyter-0.1.0a3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apibean_jupyter-0.1.0a3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file apibean_jupyter-0.1.0a3.tar.gz.

File metadata

  • Download URL: apibean_jupyter-0.1.0a3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for apibean_jupyter-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 4b52f9fdb254ca3911045d7009573f08ce05ab4d161cbfb461f08b3eb5c7fcb8
MD5 e641810a31167c0ec05a41722578c865
BLAKE2b-256 0611ade9dc10ad72820f0303c70e42cdd71af1f5f493192e618dbc02d21766cd

See more details on using hashes here.

File details

Details for the file apibean_jupyter-0.1.0a3-py3-none-any.whl.

File metadata

File hashes

Hashes for apibean_jupyter-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 6dc2942d858b02713e2692e55d4a677f2a1d9b9892f07ba56de14c9dff4454f0
MD5 8312b95c2aba7972ed72e6dd37f21b2d
BLAKE2b-256 7c9edf0620b59c75d90334d5c92a47c52f0b744ea052baa50df953dc30f6e027

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page