This package is part of the Dataflow Notebooks project and provides the Dataflow Python kernel for Jupyter, and is intended to be used with JupyerLab in concert with the dfnotebook-extension. This kernel seeks to elevate outputs as memorable waypoints during exploratory computation. To that end,
- Cell identifiers are persistent across sessions and are random UUIDs to signal they do not depend on top-down order.
- As with standard IPython, outputs are designated by being written as expressions or assignments on the last line of a cell.
- Each output is identified by its variable name if one is specified (e.g.
a
,c,d = 4,5
), and the cell identifier if not (e.g.4 + c
) - Variable names can be reused across cells.
- Cells are executed as closures so only the outputs are accessible from other cells.
- An output can then be referenced in three ways:
- unscoped:
foo
refers to the most recent execution output namedfoo
- persistent:
foo$ba012345
refers to outputfoo
from cellba012345
- tagged:
foo$bar
refers to outputfoo
from the cell tagged asbar
- unscoped:
- All output references are transformed to persistent names upon execution.
- Output references implicitly define a dataflow in a directed acyclic graph, and the kernel automatically executes dependencies.
These instructions only install the kernel. Please see the dfnotebook-extension instructions for full instructions.
pip install dfkernel
git clone https://github.com/dataflownb/dfkernel
cd dfkernel
pip install -e .
python -m dfkernel install [--user|--sys-prefix]
Note that --sys-prefix
works best for conda environments.
- IPython >= 7.0
- JupyterLab >= 2.0
- ipykernel >= 4.8.2
dfkernel 1.0 worked with Jupyter Notebook, but we have decided to support JupyterLab in the future. Documentation and tutorials for v1.0 are below, but still need to be updated for v2.0.