Skip to main content

Simply returns either notebook filename or the full path to the notebook when run from Jupyter notebook in browser.

Project description

ipynbname

When run in a Jupyter notebook, simply returns the notebook filename or the full path to the notebook.

Examples

Get the notebook name:

import ipynbname
nb_fname = ipynbname.name()

Get the full path to the notebook:

import ipynbname
nb_path = ipynbname.path()

You would think there was already some built-in way to access the current notebook name, but it took many hours of searching for a way to do it. As it seems many others did, I tried using Javascript, but the async nature of JS meant that it was unreliable. Finally I stumbled on this post. Credit for most of the code goes to the author of this post, thanks!

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

ipynbname-2020.2.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipynbname-2020.2.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file ipynbname-2020.2.2.tar.gz.

File metadata

  • Download URL: ipynbname-2020.2.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ipynbname-2020.2.2.tar.gz
Algorithm Hash digest
SHA256 4e51b50d05211bcb3a824ccebb310c6d04fd6e975e347bd66822ca5de51b397e
MD5 b1d950fcc081c5b97f374efcddfbd34b
BLAKE2b-256 7841bf267665f384967c93ef0f74207a1d31ddd30e2ebdef1acc1c4fc4c99325

See more details on using hashes here.

File details

Details for the file ipynbname-2020.2.2-py3-none-any.whl.

File metadata

  • Download URL: ipynbname-2020.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for ipynbname-2020.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa2f76d0c1cfb40f3f781b238a972275959ea7c078fe08591feaa9a7d412e8c
MD5 f4cf25fdbb124c75abccdcbdd377ea63
BLAKE2b-256 3d9f4b43ac7874831e51f0ecdbae90bbdb625c00ac52acb8f51b0307343ee52e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page