A simple python package to get the path of the current IPython / Jupyter Notebook file.
Project description
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__)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipynb_path-0.1.5.tar.gz.
File metadata
- Download URL: ipynb_path-0.1.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.7.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b5f32ea1153244be3298d3c3bf43a592d28d6f3f7002a51efe8e0d64d4c5b4f
|
|
| MD5 |
8a638a30139369571dd399015d9d7048
|
|
| BLAKE2b-256 |
02613af4d11ea40babc801437ad5d63dbb70e725472b580ffc2274a6971d6d9d
|
File details
Details for the file ipynb_path-0.1.5-py3-none-any.whl.
File metadata
- Download URL: ipynb_path-0.1.5-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.7.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33651d900f255a0f63f0976704482ac5e26bbebcc5e1e9f2628da037e5599e4
|
|
| MD5 |
4a71eea6112ec0db7211ed02e98cd3a3
|
|
| BLAKE2b-256 |
5f9ef925050baed1b74cb385d3ec725fbe3612177b5a6ced97ce1fa1fa1e7379
|