{
"info": {
"author": "Xyoz Netsphere",
"author_email": "nanoowl@xyooz.net",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: Software Development :: Libraries"
],
"description": "PyTS3\n=====\n\nForked from https://github.com/benediktschmitt/py-ts3, which only supports ServerQuery. However, benediktschmitts\nversion is more likely to be up-to-date, since this was only forked for one specific project and only implements a small\nsubset of ClientQuery methods.\n\nThis package provides a **Python 3 API** for:\n\n* TS3 query connections\n* TS3 query events\n* TS3 file transfers\n\nYou can find a complete API documentation\n`here `_.\n\nInstallation\n------------\n\nThis package is registered on PyPi, so you're done with:\n\n.. code-block:: bash\n\n\t$ pip3 install ts3\n\nTS3 Server configuration\n------------------------\n\nIf you want to send lots of queries to the TS3 server, make sure, that you're\nconnection is not closed by the **anti-flood protection** of the TS3 server.\nSo it may be wise to add the host that runs the TS3 queries to the\n``query_ip_whitelist.txt`` of your TS3 server:\n\n.. code-block:: bash\n\n\t$ echo \"192.168.178.42\" >> path/to/ts3/server/directory/query_ip_whitelist.txt\n\nIntroduction\n------------\n\nThe easiest way to get to grips with this library is taking a look at the\n`examples `_.\n\nIf you need information about the possible query commands, take a look at the\n**TS3 Server Query Manual**.\n\nExamples\n''''''''\n\nYou can find more examples in the ``ts3.examples`` package.\n\n*\tShow all clients on the virtual server with the server id 1:\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport ts3\n\n\t\twith ts3.query.TS3ServerConnection(\"localhost\") as ts3conn:\n\t\t\t# Note, that the client will wait for the response and raise a\n\t\t\t# **TS3QueryError** if the error id of the response is not 0.\n\t\t\ttry:\n\t\t\t\tts3conn.login(\n\t\t\t\t\tclient_login_name=\"serveradmin\",\n\t\t\t\t\tclient_login_password=\"FoOBa9\"\n\t\t\t\t)\n\t\t\texcept ts3.query.TS3QueryError as err:\n\t\t\t\tprint(\"Login failed:\", err.resp.error[\"msg\"])\n\t\t\t\texit(1)\n\n\t\t\tts3conn.use(sid=1)\n\n\t\t\t# Each query method will return a **TS3QueryResponse** instance,\n\t\t\t# with the response.\n\t\t\tresp = ts3conn.clientlist()\n\t\t\tprint(\"Clients on the server:\", resp.parsed)\n\t\t\tprint(\"Error:\", resp.error[\"id\"], resp.error[\"msg\"])\n\n\t\t\t# Note, the TS3Response class and therefore the TS3QueryResponse\n\t\t\t# class too, can work as a rudimentary container. So, these two\n\t\t\t# commands are equal:\n\t\t\tfor client in resp.parsed:\n\t\t\t\tprint(client)\n\t\t\tfor client in resp:\n\t\t\t\tprint(client)\n\n*\tSay hello to all clients:\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport ts3\n\n\t\twith ts3.query.TS3ServerConnection(\"localhost\") as ts3conn:\n\t\t\tts3conn.login(\n\t\t\t\tclient_login_name=\"serveradmin\",\n\t\t\t\tclient_login_password=\"FoOBa9\"\n\t\t\t)\n\t\t\tts3conn.use(sid=1)\n\n\t\t\tfor client in ts3conn.clientlist():\n\t\t\t\tmsg = \"Hi {}\".format(client[\"client_nickname\"])\n\t\t\t\tts3conn.clientpoke(clid=client[\"clid\"], msg=msg)\n\n*\tSay hello to all clients but use it with the ClientQuery plugin instead of a ServerQuery connection:\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport ts3\n\n\t\twith ts3.query.TS3Connection(\"localhost\", 25639) as ts3conn:\n\t\t\tts3conn.auth(apikey=\"AAAA-BBBB-CCCC-DDDD-EEEEh\")\n\n\t\t\tfor client in ts3conn.clientlist():\n\t\t\t\tmsg = \"Hi {}\".format(client[\"client_nickname\"])\n\t\t\t\tts3conn.clientpoke(clid=client[\"clid\"], msg=msg)\n\n*\tEvent handling (*Server Query*):\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport time\n\t\timport ts3\n\n\t\twith ts3.query.TS3ServerConnection(\"localhost\") as ts3conn:\n\t\t\tts3conn.login(\n\t\t\t\tclient_login_name=\"serveradmin\",\n\t\t\t\tclient_login_password=\"FoOBa9\"\n\t\t\t)\n\t\t\tts3conn.use(sid=1)\n\n\t\t\t# Register for events\n\t\t\tts3conn.servernotifyregister(event=\"server\")\n\n\t\t\twhile True:\n\t\t\t\tevent = ts3conn.wait_for_event()\n\n\t\t\t\t# Greet new clients.\n\t\t\t\tif event[0][\"reasonid\"] == \"0\":\n\t\t\t\t\tprint(\"client connected\")\n\t\t\t\t\tts3conn.clientpoke(clid=event[0][\"clid\"], msg=\"Hello :)\")\n\n*\tA simple TS3 viewer:\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport ts3\n\n\t\t# The examples package already contains this implementation.\n\t\t# Note, that the ts3.examples.viewer module has an helpful class to\n\t\t# build a complete channel tree of a virtual server: ChannelTreeNode\n\t\tfrom ts3.examples.viewer import view\n\n\t\twith ts3.query.TS3ServerConnection(\"localhost\") as ts3conn:\n\t\t\tts3conn.login(\n\t\t\t\tclient_login_name=\"serveradmin\",\n\t\t\t\tclient_login_password=\"FoOBa9\"\n\t\t\t)\n\t\t\tview(ts3conn, sid=1)\n\n*\tDownload and upload files:\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport ts3\n\n\t\twith ts3.query.TS3ServerConnection(\"localhost\") as ts3conn:\n\t\t\tts3conn.login(\n\t\t\t\tclient_login_name=\"serveradmin\",\n\t\t\t\tclient_login_password=\"FoOBa9\"\n\t\t\t)\n\n\t\t\t# Create a new TS3FileTransfer instance associated with the\n\t\t\t# TS3ServerConnection.\n\t\t\tts3ft = ts3.filetransfer.TS3FileTransfer(ts3conn)\n\n\t\t\t# Upload the image *baz.png* to the channel with the id 2 on the\n\t\t\t# TS3 server.\n\t\t\t# Note the opening mode (\"rb\").\n\t\t\twith open(\"baz.png\", \"rb\") as file:\n\t\t\t\tts3ft.init_upload(input_file=file, name=\"/baz.png\", cid=2)\n\n\t\t\t# Download the file into *baz1.png*.\n\t\t\twith open(\"baz1.png\", \"wb\") as file:\n\t\t\t\tts3ft.init_download(output_file=file, name=\"/baz.png\", cid=2)\n\n*\tEvent handling (*Client Query*):\n\n\t.. code-block:: python\n\n\t\t#!/usr/bin/python3\n\n\t\timport time\n\t\timport ts3\n\n\t\twith ts3.query.TS3ClientConnection(\"localhost\") as ts3conn:\n\t\t\tts3conn.auth(apikey=\"AAAA-....-EEEE\")\n\t\t\tts3conn.use()\n\n\t\t\t# Register for events\n\t\t\tts3conn.clientnotifyregister(event=\"any\")\n\n\t\t\twhile True:\n\t\t\t\tevent = ts3conn.wait_for_event()\n\t\t\t\tprint(event.parsed)\n\nBugs\n----\n\nIf you found a bug please report it or sent a pull request.\n\nPlease report grammar or spelling errors too.\n\nVersioning\n----------\n\nFor the version numbers, take a look at http://semver.org/.\n\nLicense\n-------\n\nThis package is licensed under the MIT License.\n\nThe docstrings copied from the TS3 Server Query Manual are the property of the\n`TeamSpeak Systems GmbH `_.\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://gitlab.com/networkjanitor/py-ts3",
"keywords": "",
"license": "License\n=======\n\nThe MIT License (MIT)\n\nCopyright (c) 2013-2017 Benedikt Schmitt \n 2017 Xyoz Netsphere\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"maintainer": "",
"maintainer_email": "",
"name": "ts3query",
"package_url": "https://pypi.org/project/ts3query/",
"platform": "",
"project_url": "https://pypi.org/project/ts3query/",
"project_urls": {
"Homepage": "https://gitlab.com/networkjanitor/py-ts3"
},
"release_url": "https://pypi.org/project/ts3query/2.0.1/",
"requires_dist": null,
"requires_python": "",
"summary": "TS3 Server&Client Query API",
"version": "2.0.1"
},
"last_serial": 3347269,
"releases": {
"1.0.7": [
{
"comment_text": "",
"digests": {
"md5": "bf147499026f0bfd20cb98f39fe4ebe6",
"sha256": "03b4e18e25d5e67af78b7ee5e8dd05d1daaafe8aa260dc85301572ab0e17c83b"
},
"downloads": -1,
"filename": "ts3query-1.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf147499026f0bfd20cb98f39fe4ebe6",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 57224,
"upload_time": "2017-08-15T18:08:35",
"url": "https://files.pythonhosted.org/packages/28/61/4525e5cd21737dd0cdfcdc344b6c915ffa369be410d44a3e364730ce8fcf/ts3query-1.0.7-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "8bc13eb176a0a6739ea2990da2d4d7e8",
"sha256": "28041695cbd613b4d3acf10d8eaa461e69e2f0e1419c7cdf748bd16294c24980"
},
"downloads": -1,
"filename": "ts3query-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "8bc13eb176a0a6739ea2990da2d4d7e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 43807,
"upload_time": "2017-08-15T18:08:33",
"url": "https://files.pythonhosted.org/packages/5c/db/425c28639456ac593dee5d87c782df5d8327b150ceea86ee314a5628efe0/ts3query-1.0.7.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "5cbd3c764d2d17a095d8caad7faacd7a",
"sha256": "b8d58b631b12c92920aa7a43faa3cd64378e9fdb1b658ab1e1725d6176f0d73f"
},
"downloads": -1,
"filename": "ts3query-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5cbd3c764d2d17a095d8caad7faacd7a",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 56959,
"upload_time": "2017-08-29T20:01:04",
"url": "https://files.pythonhosted.org/packages/41/40/fb0538132be34595a68ebd44fddf56989eb48819b8caf0ea451d14650e5b/ts3query-1.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "13bbd4cb155c77f6bd5f86f57f32fcd0",
"sha256": "a30aebaad657e98ee14964f4a07adfd4a9f83d5448e43cf29c6325933a12df02"
},
"downloads": -1,
"filename": "ts3query-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "13bbd4cb155c77f6bd5f86f57f32fcd0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 43553,
"upload_time": "2017-08-29T20:01:01",
"url": "https://files.pythonhosted.org/packages/3d/e0/bbe0f26486a60c11c7394098cda8fed7c30f1fc9cbfec3d37e60de06c54f/ts3query-1.1.0.tar.gz"
}
],
"2.0.1": [
{
"comment_text": "",
"digests": {
"md5": "ae941547eeb71e6668a3ad809cb65c6a",
"sha256": "5b58c340a586bad1dec4f41af360dac0ae4089c075191fb336f1c2584c58f898"
},
"downloads": -1,
"filename": "ts3query-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae941547eeb71e6668a3ad809cb65c6a",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 66385,
"upload_time": "2017-11-20T02:50:59",
"url": "https://files.pythonhosted.org/packages/5d/89/0c3b4f1d3c8b549ed4d3eee6a76f360e234cd9878856ca1b1a8abdc1921c/ts3query-2.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2ec4cf7ac1344d7ee83d933886d679ed",
"sha256": "8005ba032f495faeed0805d5dabcbf61e3a7456a91a47cb47c2f3d791e08dc5a"
},
"downloads": -1,
"filename": "ts3query-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "2ec4cf7ac1344d7ee83d933886d679ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 50918,
"upload_time": "2017-11-20T02:50:57",
"url": "https://files.pythonhosted.org/packages/36/51/264c4e8bc6a918c871ea1f5458363e3425f746d44b23d95c83bedbfa7e4e/ts3query-2.0.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ae941547eeb71e6668a3ad809cb65c6a",
"sha256": "5b58c340a586bad1dec4f41af360dac0ae4089c075191fb336f1c2584c58f898"
},
"downloads": -1,
"filename": "ts3query-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae941547eeb71e6668a3ad809cb65c6a",
"packagetype": "bdist_wheel",
"python_version": "3.6",
"requires_python": null,
"size": 66385,
"upload_time": "2017-11-20T02:50:59",
"url": "https://files.pythonhosted.org/packages/5d/89/0c3b4f1d3c8b549ed4d3eee6a76f360e234cd9878856ca1b1a8abdc1921c/ts3query-2.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2ec4cf7ac1344d7ee83d933886d679ed",
"sha256": "8005ba032f495faeed0805d5dabcbf61e3a7456a91a47cb47c2f3d791e08dc5a"
},
"downloads": -1,
"filename": "ts3query-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "2ec4cf7ac1344d7ee83d933886d679ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 50918,
"upload_time": "2017-11-20T02:50:57",
"url": "https://files.pythonhosted.org/packages/36/51/264c4e8bc6a918c871ea1f5458363e3425f746d44b23d95c83bedbfa7e4e/ts3query-2.0.1.tar.gz"
}
]
}