Skip to main content

blab Tools for Jupyter

Some Jupyter Tools, see jupyter directory for examples

Install

pip install blab

Usage

Put this code in the first cell of your notebook:

# blab init
try:
    import blab
except ImportError as e:
    !pip install blab
    import blab    
startup_notebook = blab.blab_startup()
%run $startup_notebook  

Features

blab is a collection of tools designed to enhance and streamline the Jupyter Notebook workflow. It provides two main categories of features:

  • Python functions available in the blab_tools.py module and
  • functionalities enabled through a startup-notebook (blab_startup.ipynb by default)

Python Functions (blab_tools.py)

These functions are directly accessible after installing the blab library

run_notebooks()

Executes all Jupyter Notebooks (.ipynb) in the current directory in alphabetical order. Supports different execution modes: list: Lists the notebooks to be executed. run: Executes notebooks and stops on the first error. force: Executes all notebooks, ignoring errors. Allows excluding notebooks via the exclude parameter. Allows specifying an output directory with the out_dir parameter. Allows setting a cell timeout with the cell_timeout parameter. Prints the elapsed time for each notebook execution.

search_notebooks()

Performs a search for a string within Jupyter Notebooks and Python files. Searches code cells, markdown cells, and output cells in notebooks. Allows specifying the search scope with the radius parameter (current directory, parent directory, etc.). Allows excluding files with the exclude parameter. Allows specifying the file type with the suffix parameter (ipynb, py, etc.). Prints the filenames of the files containing the search term.

help()

Displays the documentation of a Python object (function, class, etc.) in a formatted Markdown output within a Jupyter Notebook. Interprets Markdown formatting in docstrings. Uses inspect.signature() and inspect.getdoc().

Startup Notebook Functionalities (blab_startup.ipynb)

These features are enabled by running the blab_startup.ipynb notebook at the beginning of your Jupyter session:

  • Automatic libs Folder Integration: Automatically detects a local folder named libs and adds it to the Python path. Enables easy use of private libraries within Jupyter Notebooks.
  • Automatic Configuration:
    • Loads autoreload for automatic reloading of changed modules.
    • Loads ipytest for running tests within Jupyter Notebooks.
    • Configures %matplotlib inline for displaying plots directly in the notebook.

raise Stop

Ends the execution of a notebook and displays the elapsed time.

bgc()

Sets the background color of a notebook cell.

Release files for blab 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blab 0.2.2
File Size Uploaded
blab-0.2.2.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blab 0.2.2
File Interpreter ABI Platform
blab-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.0 kB

Release files / blab-0.2.2.tar.gz

Download URL blab-0.2.2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7f43153ae2220e3829edd2845747a324b0bb611950d97620ac7fe2e2601c7041
BLAKE2b-256 checksum
How to use checksums
61e7cbfe3acefa550e674f36e413297a458e3e8dd22136093523ebd2b2477463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.0 CPython/3.12.3 Linux/6.14.0-29-generic

Release files / blab-0.2.2-py3-none-any.whl

Download URL blab-0.2.2-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22c71c21efa6153131b963cdcb4aba44fe94fcde481cfb4bba5aa9f3b0a47d77
BLAKE2b-256 checksum
How to use checksums
01d930cb226703c78e97df055dd616804d71cefc899e0811e2124b5f7ad818f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.0 CPython/3.12.3 Linux/6.14.0-29-generic

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.23

2 release files

0.0.22

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page