Skip to main content

Lightweight CUE sheet toolkit for Python

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuetools-1.0.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cuetools-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file cuetools-1.0.0.tar.gz.

File metadata

  • Download URL: cuetools-1.0.0.tar.gz
  • Upload date:
  • Size: 9.1 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

Hashes for cuetools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d3298ee5ebb0e184688a8ff8b7411a7c6c81d9a956bdd1d13784e3771d8402f
MD5 858c998f61d9c14d8790c81e48b6a0a3
BLAKE2b-256 1766fa756a763815cfb8ced7d1ae5be4cda8d1c3de55593737b030eaf77b69aa

See more details on using hashes here.

File details

Details for the file cuetools-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cuetools-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 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

Hashes for cuetools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63a7c133c11e88d0cbebf0f4721923cd1de2c07df585cf5ee3b26aeec492964c
MD5 1dd1436b75a86e3b21c1d34fa014f01e
BLAKE2b-256 2517bc3a18e7fe7a06fea7bb70c4523a92359cb172764bd5d1bb3f0a83ad14c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page