Skip to main content

No project description provided

Project description

LPTrack

LavaPlayer encoded track encoder and decoder.

Introduction

LPTrack is a small library which allows you to interpret the encoded track data used by LavaPlayer.

This is useful when you're dealing with standalone LavaLink instances like Lavalink and Andesite, because it allows you to interpret the track data directly.

Installation

From PyPI

pip install lptrack

Usage

import lptrack

track = lptrack.Track(
    version = 2,
    source = lptrack.Youtube(),

    info = lptrack.TrackInfo(
        title="A song",
        author="Some random artist",
        duration=120,                   # duration is in seconds!
        identifier="dQw4w9WgXcQ",
        is_stream=False,
    ),
)

encoded = lptrack.encode(track)
print(encoded)
# b'QAAARQIABkEgc29uZwASU29tZSByYW5kb20gYXJ0aXN0AAAAAAAB1MAAC2RRdzR3OVdnWGNRAAAAB3lvdXR1YmUAAAAAAAAAAA=='

decoded = lptrack.decode(encoded)

assert decoded == encoded

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

lptrack-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file lptrack-0.1.0.tar.gz.

File metadata

  • Download URL: lptrack-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.4

File hashes

Hashes for lptrack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 880bdca28d16514e9bb71cd9121cf5ba3f2ce16c8d42a67c1623eb84367c8b63
MD5 4d6a9eee49fe46876ba3a25c824bb4cf
BLAKE2b-256 94c0db8e977e16ca9403b000c24d9df8adfeaa7f55862d9c0fdd4a4a7968b058

See more details on using hashes here.

Supported by

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