Skip to main content

Utilities to read and write Traktor NML files

Project description

Traktor NML utils

Build Status

This module contains utilities to parse and modify Native Instruments Traktor NML files.

It can parse collection files ($TRAKTOR_DIR/collection.nml) and history files ($TRAKTOR_DIR/History/history_$DATE.nml).

Requirements

Because traktor-nml-utils uses dataclasses, you need at least Python 3.7.x.

Installation

pip install traktor-nml-utils

Usage

Get artist, title and rating of all collection entries

from traktor_nml_utils import TraktorCollection
from pathlib import Path

collection = TraktorCollection(path=Path('collection.nml'))

for entry in collection.nml.entry:
    print(entry.artist, entry.title, entry.info.ranking)

Get cuepoint start

from traktor_nml_utils import TraktorCollection
from pathlib import Path

collection = TraktorCollection(path=Path('collection.nml'))

entry = collection.nml.entry[0]

for cue_v2 in entry.cue_v2:
    print(cue_v2.start)

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

traktor-nml-utils-2.0.4.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

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