--- id: ipynbname version: "2025.8.0.0" license: MIT license_treatment: permissive maintenance: aging --- # ipynbname — Simply returns either notebook filename or the full path to the notebook when run from Jupyter notebook in browser. License: permissive · Maintenance: aging · Downloads: 251.6K/mo ## What it is and what it does ipynbname solves a surprisingly difficult problem: getting the filename or full path of the notebook you're currently running in Jupyter. When executed in a browser-based notebook, it queries the Jupyter kernel to retrieve this metadata, which is not otherwise easily accessible from within the notebook itself. The package exposes two main functions—name() to get just the filename and path() to get the full file path—making it straightforward to automate workflows that depend on knowing which notebook is running. The package was originally created to automate publishing blog posts written in Jupyter notebooks directly to GitHub Pages. It has a single runtime dependency on ipykernel and requires Python >=3.4. The main limitation is that it only works reliably in browser-based Jupyter notebooks; it does not currently work with nbconvert or papermill. Use it for: - Automating blog post publishing workflows by detecting which notebook is being converted and routing it to the correct destination. - Logging or tracking which notebook generated a particular output or result in a data analysis pipeline. - Dynamically naming output files or directories based on the source notebook filename without manual configuration. - Building notebook-aware automation that needs to know its own filename for reproducibility or audit purposes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Returns the filename or full path of the currently running Jupyter notebook when executed in a browser-based notebook environment. Yes, if you need to programmatically access the current notebook's filename or path within a browser-based Jupyter environment. The low install friction and permissive MIT license make it a lightweight addition. However, be aware that maintenance is aging (last release 362 days ago) and the package has known limitations outside browser notebooks, so verify it works with your specific Jupyter setup before relying on it in production workflows. ## Install pip install ipynbname uv add ipynbname poetry add ipynbname ## Installing ipynbname Before you install: Low install friction with a single runtime dependency on ipykernel. Maintenance status is aging—last release was 362 days ago and the repository shows minimal recent activity, though it remains unarchived. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install ipynbname import ipynbname nb_fname = ipynbname.name() nb_path = ipynbname.path() Only works reliably when running in a browser-based Jupyter notebook; does not work with nbconvert or papermill. Verify before relying: - Whether the package works reliably with current Jupyter versions and modern notebook interfaces. - Performance characteristics when called repeatedly or in long-running notebooks. - Compatibility with VS Code workaround mentioned in documentation. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 251.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags get jupyter notebook filename, current notebook path, notebook name in jupyter, access notebook filename programmatically, jupyter notebook metadata, notebook file path detection, jupyter environment introspection, jupyter-integration, notebook-automation [View on SkillFed](https://skillfed.io/packages/ipynbname) · [View on PyPI](https://pypi.org/project/ipynbname/)