{"id":13897413,"url":"https://github.com/jonian/python-acestream","last_synced_at":"2025-04-13T19:13:29.126Z","repository":{"id":53099016,"uuid":"156889506","full_name":"jonian/python-acestream","owner":"jonian","description":"Python interface to interact with the AceStream Engine and the HTTP API","archived":false,"fork":false,"pushed_at":"2021-04-28T17:23:55.000Z","size":72,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T09:52:11.455Z","etag":null,"topics":["acestream","api","pypi","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-09T16:34:45.000Z","updated_at":"2024-08-07T06:51:07.000Z","dependencies_parsed_at":"2022-09-26T17:10:37.503Z","dependency_job_id":null,"html_url":"https://github.com/jonian/python-acestream","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonian%2Fpython-acestream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonian%2Fpython-acestream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonian%2Fpython-acestream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonian%2Fpython-acestream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonian","download_url":"https://codeload.github.com/jonian/python-acestream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766747,"owners_count":21158301,"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":["acestream","api","pypi","python"],"created_at":"2024-08-06T18:03:34.412Z","updated_at":"2025-04-13T19:13:29.092Z","avatar_url":"https://github.com/jonian.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Python AceStream\nPython interface to interact with the AceStream [Engine](https://wiki.acestream.media/Streaming), [HTTP API](https://wiki.acestream.media/Engine_HTTP_API) and [Search API](https://wiki.acestream.media/Search_API).\n\n## Installation\n```\npip install acestream\n```\n\n## Usage\n```python\nimport time\nimport subprocess\n\nfrom acestream.server import Server\nfrom acestream.engine import Engine\nfrom acestream.stream import Stream\n\n# Create an engine instance\nengine = Engine('acestreamengine', client_console=True)\n\n# Connect to a remote server\nserver = Server(host='streams.com', port=6880)\n\n# If the remote server is not available, connect to a local server\nif not server.available:\n  server = Server(host='127.0.0.1', port=6878)\n\n  # Start engine if the local server is not available\n  if not server.available:\n    engine.start()\n\n    # Wait for engine to start\n    while not engine.running:\n      time.sleep(1)\n\n# Start a stream using an acestream channel ID\nstream = Stream(server, id='ff36fce40a7d2042e327eaf9f215a1e9cb622b56')\nstream.start()\n\n# Open a media player to play the stream\nplayer = subprocess.Popen(['mpv', stream.playback_url])\n\n# Wait for player to close and stop the stream\nplayer.communicate()\nstream.stop()\n\n# Stop acestream engine\nengine.stop()\n```\n\n## Search\n```python\nimport time\nimport random\nimport subprocess\n\nfrom acestream.server import Server\nfrom acestream.engine import Engine\nfrom acestream.search import Search\n\n# Create an engine instance\nengine = Engine('acestreamengine', client_console=True)\n\n# Connect to a local server\nserver = Server(host='127.0.0.1', port=6878)\n\n# Start engine if the local server is not available\nif not server.available:\n  engine.start(stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n\n  # Wait for engine to start\n  while not engine.running:\n    time.sleep(1)\n\n# Start a search for the sport category\nsearch = Search(server, category='sport')\nsearch.get(page=1)\n\n# Iterate and print search results\nfor result in search.results:\n  print(\"%40s %10s %40s\" % (result.name, result.bitrate, result.infohash))\n\n# Start a random stream from the search results\nstream = random.choice(search.results).stream\nstream.start(hls=True, transcode_audio=True)\n\n# Open a media player to play the stream\nplayer = subprocess.Popen(['mpv', stream.playback_url])\n\n# Wait for player to close and stop the stream\nplayer.communicate()\nstream.stop()\n\n# Stop acestream engine\nengine.stop()\n```\n\n## Contributing\nBug reports and pull requests are welcome on GitHub at https://github.com/jonian/python-acestream.\n\n## License\nPython AceStream is available as open source under the terms of the [GPLv3](http://www.gnu.org/licenses/gpl-3.0.en.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonian%2Fpython-acestream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonian%2Fpython-acestream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonian%2Fpython-acestream/lists"}