Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chord-chart

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chord-chart

Chord chart validation and transposition

  • 0.3.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

chord-chart

This package provides chord chart validation and transposition functionality.

It is written in Rust and has an accompanying library in JavaScript. Used in vrslev/songbook — lyrics and chords webapp.

Example

>>> from chord_chart import ValidationError, transpose_chart, validate_chart

>>> # that's a valid chart: | *chord-with-bass-note* *chord-without-accidental* | *chord* | *(end of the bar, then new bar ->)*
>>> # | *chord-with-accidental-and-symbols* |
>>> validate_chart('| A/E E | E | \n| C#m|')
'| A/E E | E |\n| C#m |'

>>> validate_chart('A/E E\nC#m')  # and that's not a valid one: chords without stripes between lines of bars
Traceback (most recent call last):
...
_chord_chart.ValidationError: bar line should start with stripe: A/E E

>>> transpose_chart('| A/E| E |\n| C#m|', current_key='E', new_key='Db')
'| Gb/Db | Db |\n| Bbm |'

Installation

Just pip install chord-chart on Python 3.7 to 3.11.

Development

  • make install to clean up and setup dev-env.
  • make test to build and test the package.
  • make check-types to run pyright.

Also make sure to install pre-commit hooks (pre-commit install from the repository root).

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc