Lightweight CUE sheet toolkit for Python
Project description
CueTools
Lightweight CUE sheet toolkit for Python
Parsing Cue Sheets (.cuefiles) intoPydanticdata models and validating fields
Serialising data models into Cue Sheets (.cuefiles)
Note: This is an independent Python library. The name cuetools reflects the purpose of the library (handling CUE files) and is not intended to imply any association with other projects of the same name.
Features
- Parse
.cuefiles intoPydanticmodels with built-in validation - Generate
.cuefile content from data - Simple and intuitive API like
jsonstandard library - Lightweight — no external dependencies other than
Pydantic - Fully type-annotated — compatible with
MyPy - Supports Python 3.10+
Changes
For a full list of updates, see the CHANGELOG.
Note: Version 1.0.0 includes breaking changes and is not backward compatible with earlier versions, please review the CHANGELOG.
Cue Sheet specification
-
Main cue sheet specification https://wiki.hydrogenaudio.org/index.php?title=Cue_sheet
-
Additioonal ReplayGain specification https://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification
QuickStart
Installation of the library
Via pip
pip install cuetools
Via poetry
poetry add cuetools
Using of the library
import cuetools
cue_string = """
FILE "track01.flac" WAVE
TRACK 01 AUDIO
TITLE "Intro"
PERFORMER "Artist"
INDEX 01 00:00:00
"""
cue_sheet = cuetools.loads(cue_string)
#cue_sheet is instance of AlbumData class with parsed cue_string
track = cue_sheet.tracks[0]
#track is instance of TrackData class with parsed track data
print(track.file) # Result: track01.flac
print(track.title) # Result: Intro
print(track.performer) # Result: Artist
print(track.index00.string) # Result: 00:00:00
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cuetools-1.1.0.tar.gz.
File metadata
- Download URL: cuetools-1.1.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
543f47c8b9121f2f59bcbbb018de4343ab171a4d8df97371b40179553133d5d1
|
|
| MD5 |
8334d023401bcc06d5c80f11ef5f92c9
|
|
| BLAKE2b-256 |
f8726392fbaf994312efbac8675958ac0c40ffd275d32775e3226f3a19df86c8
|
File details
Details for the file cuetools-1.1.0-py3-none-any.whl.
File metadata
- Download URL: cuetools-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.19 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f46eb558fda8d592cd32298ad46ef3996bd5012ba09f0d6e2012b7f81949762
|
|
| MD5 |
2f13115cd2bb8c7d74d1e8bae0941018
|
|
| BLAKE2b-256 |
f2076ca550e2f85dbb49e3b4cd62f992e07dba6080dff2cd5f596af3eba714bb
|