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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blab-0.2.2.tar.gz | 12.2 kB | Without provenance | Details for blab-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blab-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for blab-0.2.2-py3-none-any.whl |
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
|
Security for blab 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.