Skip to main content

Add unwanted jazz to your scripts

Project description

JazzIt 🎷

Open All Collab License Say Thanks!

Ever wanted your scripts to play music while running/ on erroring out?

Of course you didn't

But here it is anyway


pip install jazzit

What it do?

With Jazzit you can just add a decorator to your functions and jazz it up

  • You can have a elevator music to go along with your long running script
  • Play humiliating music when it errors out to put you in your place

There are default tracks you can use, or you can use your own custom tracks

How to do it?

Play Frolic from curb your enthusiasm to keep you in your place

from jazzit import error_track

@error_track("curb_your_enthusiasm.mp3", wait=7)
def run():
    for num in reversed(range(10)):

if __name__ == "__main__":

Sip coffee to elevator music while your script is running

from jazzit import waiting_track

def fibonacci(n):
    if n < 0:
        raise Exception("BE POSITIVE!!!")
    elif n == 1:
        return 0
    elif n == 2:
        return 1
        return fibonacci(n - 1) + fibonacci(n - 2)

def run(limit):
    for num in range(1, limit):

if __name__ == "__main__":

To satisfy your WHAT !!! IT WORKED !!! moments

from jazzit import success_track

def add(a,b):

if __name__ == "__main__":
    add(12, 42)

The in-build tracks are bruh_moment, elevator and curb_your_enthusiasm but you can add your custom tracks and urls

Check out some of the examples

Jupyter Notebook

Check out the colab link above or the example notebook

Use Jupyter Magic:

Load inside a Jupyter notebook

%load_ext jazzit

Running away from the PEP8 police 🚲🚓

%%waiting_track -t elevator.mp3

def fibonacci(n):
    if n < 0:
        raise Exception("BE POSITIVE!!!")
    elif n == 1:
        return 0
    elif n == 2:
        return 1
        return fibonacci(n - 1) + fibonacci(n - 2)
for num in range(1, 35):

For those BRUH moments in your life

%%error_track -t bruh.mp3 -w 3

for num in reversed(range(10)):

It worked !!!

%%success -t anime-wow.mp3 -w 3

for num in range(10):
    print(num ** 2)

There are two arguments in play here

-t or --track that needs the sound track (Can be a file path, url, inbuilt tracks)

-w or --wait (Optional, default is 3 seconds) Wait for x seconds before cutting the music


Jazz added with playsound

If you getting hit with ModuleNotFound errors while running jazzit

You might need to install Pygobject

:warning: Use wisely: Best suited for scripts you run non-professionally!


TL;DR It is definitely slower with music

I did a lil profiling on bin/

Without Music

Time to run : 5.2486350536346436 secs

With Music

Time to run: 5.270173072814941 secs

Memory profiling python -m memory_profiler bin/


Hacker News:


amrrs put together a video :)


Default tracks were pulled from royalty-free stock audio sites (They are mostly gaming and meme sound effects)

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

jazzit-0.3.1.tar.gz (3.1 MB view hashes)

Uploaded source

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