Skip to main content

A beep generator for Jupyter Notebooks (and Jupyter-Lab) that doesn't display an audio reproduction widget.

Project description

Jupyter-Beeper

A beep generator for Jupyter Notebooks (also IPython and Jupyter-Lab) that doesn't display a reproduction widget.

This library was created to solve an ongoing problem originated when creating multiple beeps with individual InvisibleAudio objects: even though the objects are displayed as blank widgets (and not the standard audio reproduction widget, with the playback controls), they still each take space thus disrupting the layout of the cell's output. This implementation uses a single display instance, updating it with a new InvisibleAudio object on each call to beep() but without changing the cell's output layout. A destructor was needed, in order to change the display instance back to a blank HTML object to prevent the sound from auto-playing every time the notebook is opened (given that the invisible widget is stored and functional on the cell's output).

Usage

import jupyter_beeper

b = jupyter_beeper.Beeper()

# Default config is frequency=440 Hz, secs=0.7 seconds, and
# blocking=False (b.beep() will return when the sound begins)
b.beep()

# We have to put a sleep statement, since the previous call 
# for b.beep() is non blocking, and then it will overlap with
# the next call to b.beep()
time.sleep(2)

# This will not return until the beep is completed
b.beep(frequency=530, secs=0.7, blocking=True)

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

Jupyter-Beeper-1.0.3.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

Jupyter_Beeper-1.0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file Jupyter-Beeper-1.0.3.tar.gz.

File metadata

  • Download URL: Jupyter-Beeper-1.0.3.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for Jupyter-Beeper-1.0.3.tar.gz
Algorithm Hash digest
SHA256 63008ab149d52d9e22ca697fbb1fb4d161f4609f5a0ce599a8b7c9629c8b5832
MD5 fdb158c32940b77e9f0aaed89ea5f850
BLAKE2b-256 6ba4ae3bdd23fa6e5d5d4ae8e049229468d8f9a8663b82cdc507037087a4c665

See more details on using hashes here.

File details

Details for the file Jupyter_Beeper-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: Jupyter_Beeper-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for Jupyter_Beeper-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 07f485b7f2058c2d9f12a262ca8fb810a44ec3c9562bfb7a26c6f9a4944e3232
MD5 10831abf7377018116d9f810109dff6d
BLAKE2b-256 7751b814db4b31ba42f20d90cec5f6df282db8c451556f7a2c02ea34e366b198

See more details on using hashes here.

Supported by

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