Skip to main content

Asynchronous wrapper for SberZvuk API

Project description

▌ Asynchronous wrapper for SberZvuk API

No official documentation provided

▌ Installation & Usage

Install the library using pip:

pip install sberzvuk-api

Example usage:

from sberzvuk-api.client import ZvukAPI


async def main():
    api = await ZvukAPI.create() # or pass your token

    # searching and gathering info about particular track
    search_result = await api.search_all("after the burial")
    
    track_id = search_result[0]['id']
    track_info = await api.get_full_track(track_id)

    # download track by track id
    download_url = await api.get_stream_url(track_id)
    await api.download_track(download_url[0])

    # gathering info about playlist and album
    playlist = await api.get_playlist(8198049)
    album = await api.get_album(674861, with_artists=False, with_tracks=True)

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

▌ Comments

Zvuk API is represented using GraphQL, but the wrapper queries get all available data so it kinda loses sense. If you need specific data from api you should modify queries in queries.py file to retrieve only what you need in your realization.


Thanks for GraphQL schema to Aiving

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sberzvuk_api-1.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file sberzvuk_api-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sberzvuk_api-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sberzvuk_api-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd5958d4b9bef5eee6773b636f1f5d1d95d3603389e971506fa12511c8232ce
MD5 ead447313835ffb0f94f2e4899310a54
BLAKE2b-256 e3f8c0f07be3114d31b1223416a8fead3d58f8cd601ba5e0bc3c71fe55eb1aec

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