Jupyter Functions Exec
High-performance Python package built in Rust to extract and execute functions directly from Jupyter Notebooks (.ipynb) -> no copy-paste.
Ignores broken cells, keeps only valid functions and imports.
Installation
Requires Python 3.11+
pip install jupyter-functions-exec
Quickstart
If your notebook.ipynb contains:
import math
def add(a, b):
return a + b
def circle_area(r):
return math.pi * r ** 2
Use it from Python:
from jupyter_functions_exec import JupyterFunctions
jf = JupyterFunctions("notebook.ipynb")
print(jf.functions_names())
# ['add', 'circle_area']
print(jf.necessary_imports())
# ['import math']
Examples
1. Execute a function
result = jf.exec_function("add", 2, 3)
print(result) # 5
With kwargs:
result = jf.exec_function("circle_area", r=10)
print(result) # 314.159...
2. Get a callable
add = jf.return_function("add")
print(add(10, 20)) # 30
3. Check and inspect
if jf.exists_function("add"):
print("found!")
print(jf.functions_names())
print(jf.necessary_imports())
API Reference
| Method | Description |
|---|---|
JupyterFunctions(path: str) |
Parse a .ipynb file. Filters broken code automatically. |
exec_function(name, *args, **kwargs) |
Execute function by name and return result. |
return_function(name) -> Callable |
Return function as callable for later use. |
exists_function(name) -> bool |
Check if function exists. O(1) lookup. |
functions_names() -> list[str] |
Get sorted list of all valid functions. |
necessary_imports() -> list[str] |
Get list of imports needed. |
How it works
- Parses
.ipynbas JSON in Rust - Extracts
import/defper code chunk - Validates each function with Python
compile()-> broken cells are skipped - Pre-compiles everything once in
__init__for fastexec
License
MIT - see LICENSE
Metadata
Release files for jupyter-functions-exec 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_functions_exec-0.8.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details for jupyter_functions_exec-0.8.0-cp311-abi3-win_amd64.whl |
| jupyter_functions_exec-0.8.0-cp311-abi3-manylinux_2_34_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ x86-64 | Details for jupyter_functions_exec-0.8.0-cp311-abi3-manylinux_2_34_x86_64.whl |
| jupyter_functions_exec-0.8.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for jupyter_functions_exec-0.8.0-cp311-abi3-macosx_11_0_arm64.whl |
Total release size: 867.3 kB
Release files / jupyter_functions_exec-0.8.0-cp311-abi3-win_amd64.whl
| Download URL | jupyter_functions_exec-0.8.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 205.1 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0ef57b324573f6d24f496383e40122ec0f6ebe5e8f4054f63865a7d803c6f2ab
|
|
BLAKE2b-256 checksum How to use checksums |
3757e7160cf635be501e1d7af58c112d1297e36bc0543ecd41c95c0ecd893e6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / jupyter_functions_exec-0.8.0-cp311-abi3-manylinux_2_34_x86_64.whl
| Download URL | jupyter_functions_exec-0.8.0-cp311-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 353.5 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
74f2f7ab25b3916abc34aff2939bb09168a588f6b1443df9c542c0106c27559a
|
|
BLAKE2b-256 checksum How to use checksums |
7b10d30f6141186d2c5848e728b6485996ba1ef40b2ca8435d750b4db2616bba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / jupyter_functions_exec-0.8.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | jupyter_functions_exec-0.8.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 308.6 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d63ac70d82a2a6ff048dd0fc12fa86e41307584891135885e0a221874e8c858d
|
|
BLAKE2b-256 checksum How to use checksums |
53acff0ef4c167040a26d99781f35904c0ee3f31686ad29ed9e46136a7a227eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logSecurity for jupyter-functions-exec 0.8.0
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.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for jupyter_functions_exec-0.8.0-cp311-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logA 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.