Skip to main content

Utilities to read and write Traktor NML files

Project description

This module contains utilities to parse and modify Native Instruments Traktor NML files. It was created to be the by far best available library to handle Traktor collections.

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

You can deal with all XML data in the most Pythonic way.

Requirements

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

Installation

pip install --user git+ssh://git@github.com/ifischer/traktor-nml-utils.git@1.0.0

Usage

from traktor_nml_utils import TraktorCollection

collection = TraktorCollection('collection.nml')

for entry in collection.entries:
    print(entry)

for history_item in collection.history:
    print(history_item)

for playlist in collection.playlists:
    print(playlist)

Run tests

Run tests within Docker container:

make build test

Tutorials

Get artist, title and rating of all collection entries

from traktor_nml_utils import TraktorCollection

collection = TraktorCollection('collection.nml')

for entry in collection.entries:
    print(f'{entry.artist} - {entry.title} ({entry.ranking}')

Project details


Download files

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

Files for traktor-nml-utils, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size traktor-nml-utils-1.0.2.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page