scale-library
Python package bundling the data from scale-library, a library of microtonal scales with sources attributed.
scale_dir()returns the path to the directory containing the bundled scl filesscale_index_path()returns the path to the scale index csvparse_scl_info(text)parses thescale-libraryscl file[info]blocks containing structured metadata
Install scale-library:
$ pip install scale-library
Read an individual scl file:
>>> import scale_library as sl
>>>
>>> scl_path = sl.scale_dir() / "damusc/Georgia_GVM206-M.scl"
>>> scl_text = scl_path.read_text()
Read the scale index as a dataframe:
>>> import pandas as pd
>>> import scale_library as sl
>>>
>>> scale_index_df = pd.read_csv(sl.scale_index_path())
The scl files in scale-library contain [info] blocks for structured metadata, for example:
! xenoga24.scl
!
Xeno-Gothic rational adaptive tuning, 3-7 ratios (keyboards 64:63 apart)
24
!
64/63
2187/2048
243/224
9/8
8/7
32/27
2048/1701
81/64
9/7
4/3
256/189
729/512
81/56
3/2
32/21
6561/4096
729/448
27/16
12/7
16/9
1024/567
243/128
27/14
2/1
!
! https://yahootuninggroupsultimatebackup.github.io/tuning/topicId_16640.html#16640
!
! [info]
! source = Mailing lists
! file = tuning/messages/yahoo_tuning_messages_api_raw_0-19436.json
! topic_id = 16640
! msg_id = 16640
Parse a scale-library scl file [info] block:
>>> import scale_library as sl
>>> from pprint import pprint
>>>
>>> scl_text = (sl.scale_dir() / "mailing-lists/xenoga24.scl").read_text()
>>> info = sl.parse_scl_info(scl_text)
>>>
>>> pprint(info)
{'file': 'tuning/messages/yahoo_tuning_messages_api_raw_0-19436.json',
'msg_id': '16640',
'source': 'Mailing lists',
'topic_id': '16640'}
Metadata
Release files for scale-library 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scale_library-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for scale_library-1.3.0-py3-none-any.whl |
Release files / scale_library-1.3.0-py3-none-any.whl
| Download URL | scale_library-1.3.0-py3-none-any.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66d90970f2d7036934a859d09961a4cda8424bd734c91bb9f497b5c2d27c7ee8
|
|
BLAKE2b-256 checksum How to use checksums |
bf85f566ee772f762e8f28254347b8fa0070d5bd3fdb6cb44c9906abeab32139
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for scale-library 1.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.