{ "info": { "author": "Jonian Guveli", "author_email": "jonian@hardpixel.eu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# Python AceStream\nPython interface to interact with the AceStream Engine and the HTTP API.\n\n## Installation\n```\npip install acestream\n```\n\n## Usage\n```python\nimport os\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], preexec_fn=os.setsid)\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 os\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(result.name.ljust(40), str(result.bitrate).ljust(10), result.infohash)\n\n# Start a random stream from the search results\nstream = random.choice(search.results).stream\nstream.start()\n\n# Open a media player to play the stream\nplayer = subprocess.Popen(['mpv', stream.playback_url], preexec_fn=os.setsid)\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\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jonian/python-acestream", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "acestream", "package_url": "https://pypi.org/project/acestream/", "platform": "", "project_url": "https://pypi.org/project/acestream/", "project_urls": { "Bug Reports": "https://github.com/jonian/python-acestream/issues", "Homepage": "https://github.com/jonian/python-acestream", "Source": "https://github.com/jonian/python-acestream" }, "release_url": "https://pypi.org/project/acestream/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Interact with the AceStream Engine and the HTTP API", "version": "0.1.5" }, "last_serial": 4564977, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "80e3f6bbda6bb8654fdd402c7fbd3fa6", "sha256": "5f225db2aba205a017be70e341805788c78926bb0c0ccbf783f0b1508f0a48b9" }, "downloads": -1, "filename": "acestream-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "80e3f6bbda6bb8654fdd402c7fbd3fa6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18811, "upload_time": "2018-11-11T10:35:13", "url": "https://files.pythonhosted.org/packages/98/00/2d81fd2c7e313340ab7183024b386a01a6b3759975065e1d822242d30658/acestream-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "daa3ab0d3cd6c660a79a4ca7cc5d8a59", "sha256": "47a48493e362bf9ed17a10d6afb1ba2c7c88bc41a7367cf41ac13f5f987e1118" }, "downloads": -1, "filename": "acestream-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "daa3ab0d3cd6c660a79a4ca7cc5d8a59", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18840, "upload_time": "2018-11-11T19:34:26", "url": "https://files.pythonhosted.org/packages/f5/0a/274edf8375f05666036e19ba7c601f72e3d6222090e6ea3dd373dda26b0e/acestream-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "aa5ef456388c0484d512bf2436f32112", "sha256": "16d7dddf3ade194020f1d0a72a75c79e01901f81e342d2b5d1191c88ba0917b1" }, "downloads": -1, "filename": "acestream-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aa5ef456388c0484d512bf2436f32112", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18859, "upload_time": "2018-11-12T09:49:32", "url": "https://files.pythonhosted.org/packages/67/75/072ea155679f5c01443df04be984539ceeed3b83c0be79f8886266e221b9/acestream-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "152371b9e3131f83788d7e5f22f93108", "sha256": "08fb0469e1e75c48facccb3b567eebfd20d93b2c3ccb74a68a56069fc18481c7" }, "downloads": -1, "filename": "acestream-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "152371b9e3131f83788d7e5f22f93108", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18865, "upload_time": "2018-11-12T10:13:51", "url": "https://files.pythonhosted.org/packages/46/a3/41a8f33e03b5fa51a600a0cf4e66394446b6eaff7545540506f41f0cbad7/acestream-0.1.3-py2.py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "b0d214f8ef16821c2727ba61e8265e69", "sha256": "4e7aa1a780600fc7cd7e039f6c4c57d112b2b4afe65fc87e11c00de9280cc530" }, "downloads": -1, "filename": "acestream-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b0d214f8ef16821c2727ba61e8265e69", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19012, "upload_time": "2018-11-15T10:40:56", "url": "https://files.pythonhosted.org/packages/c9/0f/de3c77730f824afdf867817095220ba6838fd1e298ed69261239557483a3/acestream-0.1.4-py2.py3-none-any.whl" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "fa6e4151a7b280b5093041a4847c5459", "sha256": "e67e3abb95f20be1a9b196630f933a3cec6bef9087246aa7d4d258338634feab" }, "downloads": -1, "filename": "acestream-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fa6e4151a7b280b5093041a4847c5459", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19024, "upload_time": "2018-12-05T18:33:22", "url": "https://files.pythonhosted.org/packages/1f/9a/54b73816fc5c8ba0f73638a00931905103e3f1080aaba1714138f76a7c24/acestream-0.1.5-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fa6e4151a7b280b5093041a4847c5459", "sha256": "e67e3abb95f20be1a9b196630f933a3cec6bef9087246aa7d4d258338634feab" }, "downloads": -1, "filename": "acestream-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fa6e4151a7b280b5093041a4847c5459", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19024, "upload_time": "2018-12-05T18:33:22", "url": "https://files.pythonhosted.org/packages/1f/9a/54b73816fc5c8ba0f73638a00931905103e3f1080aaba1714138f76a7c24/acestream-0.1.5-py2.py3-none-any.whl" } ] }