Skip to main content

music-dsl

Pure music-theory domain library: notes, intervals, scale degrees, chord qualities, scales, and chord encoding. Zero runtime dependencies. This is the Python reference implementation; TypeScript (@tonalis/music-dsl on npm) and Rust (tonalis-music-dsl on crates.io) ports conform to the same spec and a shared 433-case conformance suite plus a seeded three-way differential fuzzer.

music-dsl is the theory core underneath tonalis, the format-agnostic lead-sheet DSL, and is fully usable on its own.

Install

pip install tonalis-music-dsl

Use

from music_dsl import Key, Notes, Scales

key = Key(Notes.Bb, Scales.Major)

# deeper theory lives in submodules
from music_dsl.domain.chords.chord import Chord

chord = Chord("C7")        # raises InvalidChordStringException on bad input
print(chord.encoding)      # canonical numeric chord encoding

The import name is music_dsl (underscore); the distribution name is tonalis-music-dsl.

Links

Metadata

Release files for tonalis-music-dsl 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tonalis-music-dsl 0.1.2
File Size Uploaded Provenance
tonalis_music_dsl-0.1.2.tar.gz 24.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tonalis-music-dsl 0.1.2
File Interpreter ABI Platform
tonalis_music_dsl-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 54.8 kB

Release files / tonalis_music_dsl-0.1.2.tar.gz

Download URL tonalis_music_dsl-0.1.2.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
55932b4c88dcf8662c7ec2f16c023d7f3e218111f826880f51ee79c6efaf86b5
BLAKE2b-256 checksum
How to use checksums
f04c5f16299b61c0a6f74531118834450fd2388910793e6bce1b5e3cd5fce2e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 19, 2026.

Transparency log

Release files / tonalis_music_dsl-0.1.2-py3-none-any.whl

Download URL tonalis_music_dsl-0.1.2-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55bff1a738eadb969d9b4ccf1b720924ec978cab7f67cf46c90ebb625780f6df
BLAKE2b-256 checksum
How to use checksums
9447fb3cd588daad4437064779c11db1cf013a3f58e24f27d2f2f1fb260a92bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 19, 2026.

Transparency log

Security for tonalis-music-dsl 0.1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tonalis_music_dsl-0.1.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 Aug 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page