Various Jupyter Tools
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blab-0.2.2.tar.gz.
File metadata
- Download URL: blab-0.2.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.12.3 Linux/6.14.0-29-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f43153ae2220e3829edd2845747a324b0bb611950d97620ac7fe2e2601c7041
|
|
| MD5 |
f6045b8c3a5f750f4b3ae6ae788cefd4
|
|
| BLAKE2b-256 |
61e7cbfe3acefa550e674f36e413297a458e3e8dd22136093523ebd2b2477463
|
File details
Details for the file blab-0.2.2-py3-none-any.whl.
File metadata
- Download URL: blab-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.12.3 Linux/6.14.0-29-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22c71c21efa6153131b963cdcb4aba44fe94fcde481cfb4bba5aa9f3b0a47d77
|
|
| MD5 |
eac9a8e7ccc0183cd2e6857511feb2a9
|
|
| BLAKE2b-256 |
01d930cb226703c78e97df055dd616804d71cefc899e0811e2124b5f7ad818f5
|