Skip to main content

A simple python package to get the path of the current IPython / Jupyter Notebook file.

Installation

pip install ipynb-path

Usage

If you can access to your Jupyter Notebook/Lab server without a password, you can use just ipynb_path.get() in a .ipynb file.

import ipynb_path
__file__ = ipynb_path.get()

If you need a password to access the server, you should specify it.

import ipynb_path
__file__ = ipynb_path.get(password='foo')

You can also specify __name__ for compatibility between .py and .ipynb. In this case, ipynb_path.get() does not overwrite __file__ even if it is called in a .py file.

import ipynb_path
__file__ = ipynb_path.get(__name__)

Release files for ipynb-path 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipynb-path 0.1.5
File Size Uploaded
ipynb_path-0.1.5.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipynb-path 0.1.5
File Interpreter ABI Platform
ipynb_path-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / ipynb_path-0.1.5.tar.gz

Download URL ipynb_path-0.1.5.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b5f32ea1153244be3298d3c3bf43a592d28d6f3f7002a51efe8e0d64d4c5b4f
BLAKE2b-256 checksum
How to use checksums
02613af4d11ea40babc801437ad5d63dbb70e725472b580ffc2274a6971d6d9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.7.9 Windows/10

Release files / ipynb_path-0.1.5-py3-none-any.whl

Download URL ipynb_path-0.1.5-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d33651d900f255a0f63f0976704482ac5e26bbebcc5e1e9f2628da037e5599e4
BLAKE2b-256 checksum
How to use checksums
5f9ef925050baed1b74cb385d3ec725fbe3612177b5a6ced97ce1fa1fa1e7379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.7.9 Windows/10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page