Skip to main content

Fretboard is a python library for generating SVG fretboard images and chord charts in Python.

Project description

Fretboard is a python library for generating SVG fretboard images and chord charts in Python.



pip install fretboard


Basic Examples

Guitar chord:

chord = fretboard.Chord(positions='xx0232', fingers='---132')'svg/D.svg')

Bass chord:

chord = fretboard.BassChord(positions='x221', fingers='-321')'svg/bass-E.svg')

Ukulele chord:

chord = fretboard.UkuleleChord(positions='x232', fingers='-132')'svg/ukulele-G.svg')

Penatonic scale shape:

fb = fretboard.Fretboard(frets=(5, 8), style={'marker': {'color': 'dodgerblue'}})
fb.add_marker(string=0, fret=5, label='A', color='chocolate')
fb.add_marker(string=1, fret=5, label='D')
fb.add_marker(string=2, fret=5, label='G')
fb.add_marker(string=3, fret=5, label='C')
fb.add_marker(string=4, fret=5, label='E')
fb.add_marker(string=5, fret=5, label='A', color='chocolate')

fb.add_marker(string=0, fret=8, label='C')
fb.add_marker(string=1, fret=7, label='E')
fb.add_marker(string=2, fret=7, label='A', color='chocolate')
fb.add_marker(string=3, fret=7, label='D')
fb.add_marker(string=4, fret=8, label='G')
fb.add_marker(string=5, fret=8, label='C')'svg/pentatonic-shape.svg')


The demo/ directory contains runnable examples that are served up in a web page.

python-fretboard/demo $ pip install -r requirements.txt
python-fretboard/demo $ invoke serve

Point your browser to http://localhost:8080 and check out the freshly rendered fretboards!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fretboard, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size fretboard-1.0.0.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View
Filename, size fretboard-1.0.0-py2.py3-none-any.whl (8.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page