ipyparams
Send parameters/arguments to notebooks via URL query string parameters.
Examples
If you want to prepopulate parameters like foo=bar and baz=1 in a notebook, you can simply encode them in the URL:
https://your.jupyter.server/awsome_notebook.ipynb?foo=bar&baz=1
In the notebook, just include the following:
import ipyparams
The values are now accessible in the ipyparams.params dictionary.
ipyparams.params['foo'] # returns "bar"
ipyparams.params['baz'] # returns "1"
Duplicate parameters
URL query strings can contain multiple parameters with the same name, such as https://your.jupyter.server/awsome_notebook.ipynb?foo=bar&foo=baz. The ipyparams.params dictionary only contains the last value for each name, but you can still access all the "raw" parameters using ipyparams.raw_params dictionary.
import ipyparams
ipyparams.params['foo'] # returns 'baz'
ipyparams.raw_params['foo'] # returns ['bar', 'baz']
Missing parameters
If you try to access a parameter that does not exist, you will simply get None back.
import ipyparams
ipyparams.params['unicorn'] # returns None
ipyparams.raw_params['unicorn'] # returns None
Get the notebook name
import ipyparams
ipyparams.notebook_name # returns 'awesome_notebook.ipynb'
Get the full, raw URL of the notebook
import ipyparams
ipyparams.raw_url
# returns https://your.jupyter.server/awsome_notebook.ipynb?foo=bar&baz=1
Metadata
Release files for ipyparams 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ipyparams-0.2.1.tar.gz | 2.7 kB | Without provenance | Details |
Release files / ipyparams-0.2.1.tar.gz
| Download URL | ipyparams-0.2.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84848e26f38feef663f071657ef41b8408004eb727310b9c5f17586d04ab971c
|
|
BLAKE2b-256 checksum How to use checksums |
041553a82f0623834a2a29bd5ee8aaf82eafb8d0b3cfae0366e75d69962949d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Security for ipyparams 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.