Caution
This repository is still being developed and the current code is not functional.
serato-session is a Python library for reading Serato DJ sessions. It is able to do this by either reading a file from .session files or Serato Playlists. Reading session info will let you see the current playing song and previously song history.
This library is still under development and is not yet available for installation. We hope to have it available soon on pip. Please check back later for updates.
Here are some basic examples of how to use this library.
Get currently playing song and history from session files
from serato_sessions import Sessions
sessions = Sessions()
session = Sessions.get_latest_session
print(f'Currently playing: {session.now_playing.title} by {session.now_playing.artist} \n')
print('Previously played:')
for track in session.history:
print(f'{track.start_time} - {track.title} by {track.artist}')Get currently playing song and history from a Serato playlist
from serato_sessions import Playlist
playlist = Playlist('https://serato.com/playlists/<username>/<playlist_name>')
print(f'Currently playing: {playlist.now_playing.title} by {playlist.now_playing.artist} \n')
print('Previously played:')
for track in playlist.history:
print(f'{track.start_time} - {track.title} by {track.artist}')Check out the Wiki for full documentation.
At this time, I ask that you do not send any pull requests. I do hope to hope to open this up for contributions in the future.
If the library isn't working, please open an issue on this GitHub repository. If there is a security issue please report it directly.
If you have any questions, please feel free to make a post in our GitHub Discussions
This project is licensed under the MIT License. See the LICENSE file for details.
Ely Miranda (e1miran)
Creator of Now-Playing-Serato, which this repository is a fork of.