pynotebook
Introduction
Pynotebook is a library for building notebook interfaces within wxPython. A notebook is an interactive document that integrates program code, rich text, and graphics into a single file.
Unlike heavier environments such as Jupyter or Spyder, Pynotebook is exceptionally lightweight and designed to be easily embedded into existing wxPython applications. While Python is its native language, the library is flexible enough to support other scripting languages as well.
Features
- Code cells with syntax highlighting, completion and help; the output appears right below the cell
- Text cells with formatted text for notes and documentation
- Graphics in the document: matplotlib figures, bitmaps and built-in
vector graphics (
pynotebook.graphics) - A notebook is a single wx widget, easy to embed
- Other languages can be plugged in as clients;
demo/rnotebook.pyshows R (needs rpy2) - Safe, readable file format: notebooks are saved as JSON, and opening a file never runs code
- Few dependencies: wxPython (not installed automatically), and cerealizer to read files of older versions; BSD license
Embedding
import wx
from pynotebook.nbview import NBView
app = wx.App()
frame = wx.Frame(None, title='My notebook', size=(800, 600))
view = NBView(frame) # or NBView(frame, filename='example.pnb')
frame.Show()
app.MainLoop()
view.save(filename) writes the notebook to a file.
Applications using the Pynotebook library include:
- pnb – a Python notebook application
Run demo (no installation, needs matplotlib)
cd demo
python plot_demo.py
Installation
Pynotebook needs wxPython 4.2 or newer, which is not installed automatically: usually your application or your Linux distribution already provides it. From PyPI:
pip install pynotebook
To install wxPython as well (on Linux, pip has to build it from source):
pip install "pynotebook[wx]"
From the source folder:
pip install .
If you also want to install pnb:
pip install pnb
Testing
Most files have builtin tests. All of them run with:
python all_tests.py
The tests of a single file:
python runtests.py pynotebook/nbtexels.py
Some files also have builtin demos:
python runtests.py pynotebook/nbview.py demo_00
Links
Metadata
Release files for pynotebook 0.4.2
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 | Actions |
|---|---|---|---|---|
| pynotebook-0.4.2.tar.gz | 84.8 kB | With provenance | Details for pynotebook-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynotebook-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for pynotebook-0.4.2-py3-none-any.whl |
Total release size: 184.7 kB
Release files / pynotebook-0.4.2.tar.gz
| Download URL | pynotebook-0.4.2.tar.gz |
|---|---|
| Size | 84.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
619882da62d31cc2f853f3bfcba0ef28b8796d5cebceba62f2e8a31768098868
|
|
BLAKE2b-256 checksum How to use checksums |
a6065b771991517c32d6338d6598aff745320d237eb16d1d7fb49a855a671cd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / pynotebook-0.4.2-py3-none-any.whl
| Download URL | pynotebook-0.4.2-py3-none-any.whl |
|---|---|
| Size | 100.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7363a28d251187840633182660e363ca103de4aaa994ddb38740513d73f4738
|
|
BLAKE2b-256 checksum How to use checksums |
cd796deb4809f6a286ccd31d92825a3a1f4721aeb5997e812753158c790ec1dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for pynotebook 0.4.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pynotebook-0.4.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA 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.