Skip to main content

SongTracker

License Python Platform

A python package for windows made to track the current song being listened to.

usage

Intended usage:

from songtracker import SongTracker
import asyncio

# Songtracker().run(callable)
# also possible to do SongTracker().run(callable, check_delay=5)
# default delay is 2.5sec
# Ex:
def broadcast(song):
    print(song) # song object __repr__ is f"{self.title} - {self.artist}"

asyncio.run(SongTracker().run(broadcast)) # will run infinitely and execute broadcast on song change

Manual usage:

from songtracker import SongTracker
import asyncio

# /!\ Use try/Except statement to catch OSError on winrt error
# must be run inside an async function Ex: async def main() asyncio.run(main)

tracker = Songtracker()
if await tracker.get_new_session():
    #generates a winrt session and returns a bool (True = Success)
    if await tracker.update_current_song(): 
        #generates new song object if song has changed and returns bool (True = Success)
        if not tracker.current_song.error:
            # checks if song object is usable (song.error = 1 means artist or title is None)
            # do something
            print(tracker.currentsong) # song object __repr__ is f"{self.title} - {self.artist}"

Metadata

Release files for songtracker 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for songtracker 1.0.0
File Size Uploaded
songtracker-1.0.0.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for songtracker 1.0.0
File Interpreter ABI Platform
songtracker-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / songtracker-1.0.0.tar.gz

Download URL songtracker-1.0.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
62c58034b463fc0706affffc2a05be288032689bed5bcf294cde9555e6b4fba0
BLAKE2b-256 checksum
How to use checksums
30483abd44176fc74f1b19ceba40314368b347506909c69bbb47c6470caac425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / songtracker-1.0.0-py3-none-any.whl

Download URL songtracker-1.0.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d91a3ec165db921757c722b9107affe88f14d185e3cf45d6cf6978c908f89575
BLAKE2b-256 checksum
How to use checksums
fa48be417c2d8bca283c7b3b6b02283b69b34b70bb5364c6f3d82f1b0e255392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page