ipynb
Package / Module importer for importing code from Jupyter Notebook files (.ipynb)
What it is and what it does
ipynb lets you treat Jupyter Notebook files (.ipynb) as importable Python modules. Instead of manually copying code from notebooks or exporting to .py files, you can import them directly using standard Python import syntax. The package provides two modes: full import executes all code in the notebook and exposes top-level definitions, while definitions-only import skips computational work and brings in only function/class definitions, import statements, and ALL_CAPS constants—useful when a notebook contains analysis code you don't want to re-run.
The package has no runtime dependencies and installs cleanly. However, it has been dormant since late 2017 with no recent maintenance, so it may not be tested against current Jupyter or Python versions. It works well for simple notebook-to-module workflows but is not actively developed.
Use it for:
- Reuse functions and classes defined in analysis notebooks across multiple projects without manual copying.
- Import utility notebooks as libraries in production code while keeping analysis and helper code in notebook form.
- Build modular notebook-based projects where some notebooks serve as reusable modules for others via relative imports.
- Extract only the definitions (functions, classes, constants) from a notebook without re-running exploratory or computational cells.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Imports Jupyter Notebook (.ipynb) files as Python modules, executing their code and making top-level definitions available just like regular .py imports.
Yes, if you need to import Jupyter Notebooks as modules and are working with a stable, older codebase. The low install friction and permissive license make it safe to try. However, the dormant maintenance status (no updates since 2017) means you should verify compatibility with your Jupyter and Python versions before relying on it in new projects. For modern notebook-to-module workflows, check whether newer alternatives exist.
Install
ipynb on PyPI
pip
pip install ipynbuv
uv add ipynbpoetry
poetry add ipynbInstalling ipynb
Before you install
Installation is frictionless with no runtime dependencies. The package is dormant—last release was 2017-10-23 and no commits since 2024-04-15—so expect no active maintenance or bug fixes, though the core functionality remains stable for straightforward use cases.
License in practice
BSD permissive license allows free use, modification, and distribution with minimal restrictions, making it safe to adopt in most projects without licensing concerns.
Quickstart
pip install ipynb
import ipynb.fs.full.server # Import all code from server.ipynb
# Or import only definitions:
import ipynb.fs.defs.server # Import classes, functions, imports, and ALL_CAPS constants
Verify before relying
- Whether the package works reliably with modern Jupyter versions and recent Python releases (no version constraints specified in metadata).
- Whether relative imports work correctly in all contexts, particularly across different project structures.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 3,217 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,859/month — #12,781 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ipynb-0.5.1-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
importnbimportnb lets you import Jupyter notebooks as…
permissive · top 15,000 on PyPI
pyprojrootFinds your project's root directory and…
permissive · top 15,000 on PyPI
emportEmport provides a single function to import…
permissive · top 15,000 on PyPI
ipynbnameReturns the filename or full path of the…
permissive · top 15,000 on PyPI
testbooktestbook lets you write unit tests for Jupyter…
permissive · top 15,000 on PyPI
mkdocs-jupyterConverts Jupyter notebooks and Python scripts…
permissive · top 15,000 on PyPI
session-info2Captures and displays the versions of all…
copyleft · top 5,000 on PyPI
myst-nbSphinx extension that parses and converts…
unclear · top 5,000 on PyPI
nbsphinxnbsphinx is a Sphinx extension that parses…
permissive · top 5,000 on PyPI
nbconvertnbconvert converts Jupyter notebooks (.ipynb…
permissive · top 1,000 on PyPI