Skip to main content

A python client for the hearthis.at music community API

Project description

pyhearthis

A python client for the hearthis.at music community API

The API documentation is availabe at

https://hearthis.at/api-v2

Howto use the client

  1. Get some credentials from hearthis.at (at the moment only the login with hearthis.at credentials is supported)

  2. Use the client

import asyncio
import aiohttp
from pyhearthis.hearthis import HearThis

async def do_some_queries():

    async with aiohttp.ClientSession() as session:
        hearthis = HearThis(session)
        user = await hearthis.login("mylogin", "mypassword")

        # Search for music
        search_result = await hearthis.search(user, "MySearchQuery")
        for track in search_result:
            print(track)

        # Create a playlist
        playlist = await hearthis.create_playlist(user, "MyNewPlaylist")

        # Add a track to the playlist
        await hearthis.add_track_to_playlist(user, search_result[0], playlist)

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

pyhearthis-0.0.5.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

pyhearthis-0.0.5-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

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