{"id":13861966,"url":"https://github.com/dylanljones/pyrekordbox","last_synced_at":"2025-05-15T17:07:07.915Z","repository":{"id":37930399,"uuid":"480059935","full_name":"dylanljones/pyrekordbox","owner":"dylanljones","description":"Inofficial Python package for interacting with the database and other files (XML, ANLZ, MySettings) of Pioneers Rekordbox DJ software","archived":false,"fork":false,"pushed_at":"2025-03-24T18:51:17.000Z","size":7114,"stargazers_count":228,"open_issues_count":8,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-01T01:38:01.837Z","etag":null,"topics":["anlz","database","dj","library","music","music-library","my-settings","python","rekordbox","rekordbox-v5","rekordbox-v6","rekordbox-v7"],"latest_commit_sha":null,"homepage":"https://pyrekordbox.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylanljones.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-10T15:33:04.000Z","updated_at":"2025-03-31T11:30:05.000Z","dependencies_parsed_at":"2023-09-30T10:58:39.731Z","dependency_job_id":"6aa90c75-7ef2-4491-beb5-a0e355c2e900","html_url":"https://github.com/dylanljones/pyrekordbox","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanljones%2Fpyrekordbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanljones%2Fpyrekordbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanljones%2Fpyrekordbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanljones%2Fpyrekordbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanljones","download_url":"https://codeload.github.com/dylanljones/pyrekordbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247765459,"owners_count":20992314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anlz","database","dj","library","music","music-library","my-settings","python","rekordbox","rekordbox-v5","rekordbox-v6","rekordbox-v7"],"created_at":"2024-08-05T06:01:33.890Z","updated_at":"2025-04-08T02:36:06.332Z","avatar_url":"https://github.com/dylanljones.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/dylanljones/pyrekordbox/master/docs/source/_static/logos/light/logo_primary.svg\" alt=\"logo\" height=\"70\"/\u003e\n\u003c/p\u003e\n\n[![Tests][tests-badge]][tests-link]\n[![Codecov][codecov-badge]][codecov-link]\n[![Version][pypi-badge]][pypi-link]\n[![Python][python-badge+]][pypi-link]\n[![Platform][platform-badge]][pypi-link]\n[![license: MIT][license-badge]][license-link]\n[![style: ruff][ruff-badge]][ruff-link]\n\n\u003e **Disclaimer**: This project is **not** affiliated with Pioneer Corp. or its related companies\nin any way and has been written independently! Pyrekordbox is licensed under the\n[MIT license][license-link]. The maintainers of the project are not liable for any damages to your Rekordbox library.\n\nPyrekordbox is a Python package for interacting with the library and export data of\nPioneers Rekordbox DJ Software. It currently supports\n- Rekordbox v6 master.db database\n- Rekordbox XML database\n- Analysis files (ANLZ)\n- My-Setting files\n\nTested Rekordbox versions: ``5.8.6 | 6.7.7 | 7.0.9``\n\n\u003e [!WARNING]\n\u003e This project is still under development and might contain bugs or have breaking API changes in the future.\n\u003e Check the [changelog][CHANGELOG] for recent changes!\n\n\n## 🔧 Installation\n\nPyrekordbox is available on [PyPI][pypi-link]:\n````commandline\npip install pyrekordbox\n````\n\nAlternatively, it can be installed via [GitHub][repo]\n```commandline\npip install git+https://github.com/dylanljones/pyrekordbox.git@VERSION\n```\nwhere `VERSION` is a release, tag or branch name.\n\n### Dependencies\n\n\nUnlocking the new Rekordbox 6 `master.db` database file requires [SQLCipher][sqlcipher].\nPyrekordbox tries to install pre-built wheels with included sqlcipher binaries via the [sqlcipher3-wheels] package.\nIf this fails, it can be installed manually following the [installation guide][installation].\n\n\n## 🚀 Quick-Start\n\n[Read the full documentation on ReadTheDocs!][documentation]\n\n\u003e [!CAUTION]\n\u003e Please make sure to back up your Rekordbox collection before making changes with pyrekordbox\n\u003e or developing/testing new features.\n\u003e The backup dialog can be found under \"File\" \u003e \"Library\" \u003e \"Backup Library\"\n\n\n### Configuration\n\nPyrekordbox looks for installed Rekordbox versions and sets up the configuration\nautomatically. The configuration can be checked by calling:\n````python\nfrom pyrekordbox import show_config\n\nshow_config()\n````\nIf for some reason the configuration fails the values can be updated by providing the\npaths to the directory where Pioneer applications are installed (`pioneer_install_dir`)\nand to the directory where Pioneer stores the application data  (`pioneer_app_dir`)\n````python\nfrom pyrekordbox.config import update_config\n\nupdate_config(\"\u003cpioneer_install_dir\u003e\", \"\u003cpioneer_app_dir\u003e\")\n````\n\nAlternatively the two paths can be specified in a configuration file under the section\n`rekordbox`. Supported configuration files are pyproject.toml, setup.cfg, pyrekordbox.toml,\npyrekordbox.cfg and pyrekordbox.yaml.\n\n\n### Rekordbox 6/7 database\n\nRekordbox 6 and 7 use a SQLite database for storing the collection content.\nUnfortunatly, the `master.db` SQLite database is encrypted using\n[SQLCipher][sqlcipher], which means it can't be used without the encryption key.\nHowever, since your data is stored and used locally, the key must be present on the\nmachine running Rekordbox.\n\nPyrekordbox can unlock the new Rekordbox `master.db` SQLite database and provides\nan easy interface for accessing the data stored in it:\n\n````python\nfrom pyrekordbox import Rekordbox6Database\n\ndb = Rekordbox6Database()\n\nfor content in db.get_content():\n    print(content.Title, content.Artist.Name)\n\nplaylist = db.get_playlist()[0]\nfor song in playlist.Songs:\n    content = song.Content\n    print(content.Title, content.Artist.Name)\n````\nFields in the Rekordbox database that are stored without linking to other tables\ncan be changed via the corresponding property of the object:\n````python\ncontent = db.get_content()[0]\ncontent.Title = \"New Title\"\ndb.commit()\n````\n\n\u003e [!NOTE]\n\u003e Some fields are stored as references to other tables, for example the artist of a track.\n\u003e Check the [documentation][db6-doc] of the corresponding object for more information.\n\nSo far only a few tables support adding or deleting entries:\n- ``DjmdContent``: Tracks\n- ``DjmdPlaylist``: Playlists/Playlist Folders\n- ``DjmdSongPlaylist``: Songs in a playlist\n- ``DjmdAlbum``: Albums\n- ``DjmdArtist``: Artists\n- ``DjmdGenre``: Genres\n- ``DjmdLabel``: Labels\n\nIf the automatic key extraction fails the command line interface of ``pyrekordbox``\nprovides a command for downloading the key from known sources and writing it to the\ncache file:\n````shell\npython -m pyrekordbox download-key\n````\nOnce the key is cached the database can be opened without providing the key.\nThe key can also be provided manually:\n````python\ndb = Rekordbox6Database(key=\"\u003cinsert key here\u003e\")\n````\n\n\n### Rekordbox XML\n\nThe Rekordbox XML database is used for importing (and exporting) Rekordbox collections\nincluding track metadata and playlists. They can also be used to share playlists\nbetween two databases.\n\nPyrekordbox can read and write Rekordbox XML databases.\n\n````python\nfrom pyrekordbox.rbxml import RekordboxXml\n\nxml = RekordboxXml(\"database.xml\")\n\ntrack = xml.get_track(0)    # Get track by index (or TrackID)\ntrack_id = track.TrackID    # Access via attribute\nname = track[\"Name\"]        # or dictionary syntax\n\npath = \"/path/to/file.mp3\"\ntrack = xml.add_track(path) # Add new track\ntrack[\"Name\"] = \"Title\"     # Add attributes to new track\ntrack[\"TrackID\"] = 10       # Types are handled automatically\n\n# Get playlist (folder) by path\npl = xml.get_playlist(\"Folder\", \"Sub Playlist\")\nkeys = pl.get_tracks()  # Get keys of tracks in playlist\nktype = pl.key_type     # Key can either be TrackID or Location\n\n# Add tracks and sub-playlists (folders)\npl.add_track(track.TrackID)\npl.add_playlist(\"Sub Sub Playlist\")\n````\n\n\n### Rekordbox ANLZ files\n\nRekordbox stores analysis information of the tracks in the collection in specific files,\nwhich also get exported to decives used by Pioneer professional DJ equipment. The files\nhave names like `ANLZ0000` and come with the extensions `.DAT`, `.EXT` or `.2EX`.\nThey include waveforms, beat grids (information about the precise time at which\neach beat occurs), time indices to allow efficient seeking to specific positions\ninside variable bit-rate audio streams, and lists of memory cues and loop points.\n\nPyrekordbox can parse all three analysis files, although not all the information of\nthe tracks can be extracted yet.\n\n````python\nfrom pyrekordbox.anlz import AnlzFile\n\nanlz = AnlzFile.parse_file(\"ANLZ0000.DAT\")\nbeat_grid = anlz.get(\"beat_grid\")\npath_tags = anlz.getall_tags(\"path\")\n````\n\nChanging and creating the Rekordbox analysis files is planned as well, but for that the\nfull structure of the analysis files has to be understood.\n\nUnsupported ANLZ tags:\n  - PCOB\n  - PCO2\n  - PSSI\n  - PWV6\n  - PWV7\n  - PWVC\n\n\n### Rekordbox My-Settings\n\nRekordbox stores the user settings in `*SETTING.DAT` files, which get exported to USB\ndevices. These files are either in the `PIONEER`directory of a USB drive\n(device exports), but are also present for on local installations of Rekordbox 6.\nThe setting files store the settings found on the \"DJ System\" \u003e \"My Settings\" page of\nthe Rekordbox preferences. These include language, LCD brightness, tempo fader range,\ncrossfader curve and other settings for Pioneer professional DJ equipment.\n\nPyrekordbox supports both parsing and writing My-Setting files.\n\n````python\nfrom pyrekordbox.mysettings import read_mysetting_file\n\nmysett = read_mysetting_file(\"MYSETTINGS.DAT\")\nsync = mysett.get(\"sync\")\nquant = mysett.get(\"quantize\")\n````\n\nThe `DEVSETTING.DAT` file is still not supported\n\n\n## 💡 File formats\n\nA summary of the Rekordbox file formats can be found in the [documentation]:\n\n- [Rekordbox XML format][xml-doc]\n- [ANLZ file format][anlz-doc]\n- [My-Setting file format][mysettings-doc]\n- [Rekordbox 6 database][db6-doc]\n\n\n\n## 💻 Development\n\nIf you encounter an issue or want to contribute to pyrekordbox, please feel free to get in touch,\n[open an issue][new-issue] or create a new pull request! A guide for contributing to\n`pyrekordbox` and the commit-message style can be found in\n[CONTRIBUTING].\n\nFor general questions or discussions about Rekordbox, please use [GitHub Discussions][discussions]\ninstead of opening an issue.\n\nPyrekordbox is tested on Windows and MacOS, however some features can't be tested in\nthe CI setup since it requires a working Rekordbox installation.\n\n\n## 🔗 Related Projects and References\n\n- [crate-digger]: Java library for fetching and parsing rekordbox exports and track analysis files.\n- [rekordcrate]: Library for parsing Pioneer Rekordbox device exports\n- [supbox]: Get the currently playing track from Rekordbox v6 as Audio Hijack Shoutcast/Icecast metadata, display in your OBS video broadcast or export as JSON.\n- Deep Symmetry has an extensive analysis of Rekordbox's ANLZ and .edb export file formats\n  https://djl-analysis.deepsymmetry.org/djl-analysis\n- rekordcrate reverse engineered the format of the Rekordbox MySetting files\n  https://holzhaus.github.io/rekordcrate/rekordcrate/setting/index.html\n- rekordcloud went into detail about the internals of Rekordbox 6\n  https://rekord.cloud/blog/technical-inspection-of-rekordbox-6-and-its-new-internals.\n- supbox has a nice implementation on finding the Rekordbox 6 database key\n  https://github.com/gabek/supbox\n\n\n\n\n[tests-badge]: https://img.shields.io/github/actions/workflow/status/dylanljones/pyrekordbox/tests.yml?branch=master\u0026label=tests\u0026logo=github\u0026style=flat\n[docs-badge]: https://img.shields.io/readthedocs/pyrekordbox/stable?style=flat\n[python-badge]: https://img.shields.io/pypi/pyversions/pyrekordbox?style=flat\n[python-badge+]: https://img.shields.io/badge/python-3.8+-blue.svg\n[platform-badge]: https://img.shields.io/badge/platform-win%20%7C%20osx-blue?style=flat\n[pypi-badge]: https://img.shields.io/pypi/v/pyrekordbox?style=flat\n[license-badge]: https://img.shields.io/pypi/l/pyrekordbox?color=lightgrey\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000?style=flat\n[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n[codecov-badge]: https://codecov.io/gh/dylanljones/pyrekordbox/branch/master/graph/badge.svg?token=5Z2KVGL7N3\n\n\n[pypi-link]: https://pypi.org/project/pyrekordbox/\n[license-link]: https://github.com/dylanljones/pyrekordbox/blob/master/LICENSE\n[tests-link]: https://github.com/dylanljones/pyrekordbox/actions/workflows/tests.yml\n[black-link]: https://github.com/psf/black\n[ruff-link]: https://github.com/astral-sh/ruff\n[lgtm-link]: https://lgtm.com/projects/g/dylanljones/pyrekordbox/context:python\n[codecov-link]: https://app.codecov.io/gh/dylanljones/pyrekordbox/tree/master\n[codecov-dev-link]: https://app.codecov.io/gh/dylanljones/pyrekordbox/tree/dev\n[docs-latest-badge]: https://img.shields.io/readthedocs/pyrekordbox/latest?logo=readthedocs\u0026style=flat\n[docs-dev-badge]: https://img.shields.io/readthedocs/pyrekordbox/dev?logo=readthedocs\u0026style=flat\n\n[documentation]: https://pyrekordbox.readthedocs.io/en/stable/\n[documentation-latest]: https://pyrekordbox.readthedocs.io/en/latest/\n[documentation-dev]: https://pyrekordbox.readthedocs.io/en/dev/\n[tutorial]: https://pyrekordbox.readthedocs.io/en/stable/tutorial/index.html\n[db6-doc]: https://pyrekordbox.readthedocs.io/en/stable/formats/db6.html\n[anlz-doc]: https://pyrekordbox.readthedocs.io/en/stable/formats/anlz.html\n[xml-doc]: https://pyrekordbox.readthedocs.io/en/stable/formats/xml.html\n[mysettings-doc]: https://pyrekordbox.readthedocs.io/en/stable/formats/mysetting.html\n\n[new-issue]: https://github.com/dylanljones/pyrekordbox/issues/new/choose\n[discussions]: https://github.com/dylanljones/pyrekordbox/discussions\n[CONTRIBUTING]: https://github.com/dylanljones/pyrekordbox/blob/master/CONTRIBUTING.md\n[CHANGELOG]: https://github.com/dylanljones/pyrekordbox/blob/master/CHANGELOG.md\n[installation]: https://pyrekordbox.readthedocs.io/en/latest/installation.html\n\n[repo]: https://github.com/dylanljones/pyrekordbox\n[sqlcipher]: https://www.zetetic.net/sqlcipher/open-source/\n[sqlcipher3-wheels]: https://github.com/laggykiller/sqlcipher3\n[rekordcrate]: https://github.com/Holzhaus/rekordcrate\n[crate-digger]: https://github.com/Deep-Symmetry/crate-digger\n[supbox]: https://github.com/gabek/supbox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanljones%2Fpyrekordbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanljones%2Fpyrekordbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanljones%2Fpyrekordbox/lists"}