Skip to content

Olezhich/CueTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CueTools

PyPI version License Python
Coverage Status Tests

Lightweight CUE sheet toolkit for Python
Parsing Cue Sheets (.cue files) into Pydantic data models and validating fields
Serialising data models into Cue Sheets (.cue files)

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 .cue files into Pydantic models with built-in validation
  • Generate .cue file content from data
  • Simple and intuitive API like json standard 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

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

About

Lightweight CUE sheet toolkit for Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages