{"id":17543125,"url":"https://github.com/zzzsochi/aiompd","last_synced_at":"2025-04-23T23:48:56.398Z","repository":{"id":31046686,"uuid":"34605352","full_name":"zzzsochi/aiompd","owner":"zzzsochi","description":"MPD (Music Player Daemon) client for asyncio","archived":false,"fork":false,"pushed_at":"2020-12-10T21:44:26.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T23:48:50.592Z","etag":null,"topics":["asyncio","mpd","mpd-client","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zzzsochi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-26T09:20:19.000Z","updated_at":"2024-09-28T01:27:53.000Z","dependencies_parsed_at":"2022-09-26T17:10:23.343Z","dependency_job_id":null,"html_url":"https://github.com/zzzsochi/aiompd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Faiompd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Faiompd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Faiompd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Faiompd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzzsochi","download_url":"https://codeload.github.com/zzzsochi/aiompd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535107,"owners_count":21446506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","mpd","mpd-client","python"],"created_at":"2024-10-21T00:22:57.418Z","updated_at":"2025-04-23T23:48:56.372Z","avatar_url":"https://github.com/zzzsochi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============================================\nMPD (Music Player Daemon) client for asyncio\n============================================\n\nUsage example:\n\n.. code:: python\n\n    #!/usr/bin/env python3.7\n\n    import asyncio\n    import aiompd\n\n    URLS = [\n        \"http://bb24.sonixcast.com:20038/stream\",\n        \"http://198.58.98.83:8258/stream\",\n    ]\n    PLAY_TIME = 15\n\n\n    async def nexter(mpc):\n        await mpc.clear()\n\n        for url in URLS:\n            await mpc.add(url)\n\n        for n in range(len(URLS)):\n            print(\"Playing track\", n)\n            await mpc.play(track=n)\n            await asyncio.sleep(PLAY_TIME)\n\n\n    async def volumer(mpc):\n        timeout = (len(URLS) * PLAY_TIME) / 200\n\n        for volume in range(0, 101, 1):\n            await mpc.set_volume(volume)\n            await asyncio.sleep(timeout)\n\n        for volume in range(100, -1, -1):\n            await mpc.set_volume(volume)\n            await asyncio.sleep(timeout)\n\n\n    async def main():\n        mpc = await aiompd.Client.make_connection()\n        tasks = [nexter(mpc), volumer(mpc)]\n        await asyncio.gather(*tasks)\n\n\n    if __name__ == '__main__':\n        asyncio.run(main())\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzsochi%2Faiompd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzzsochi%2Faiompd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzsochi%2Faiompd/lists"}