{ "info": { "author": "Nate Mara", "author_email": "nate.mara@kroger.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "\n.. image:: https://img.shields.io/pypi/v/mattermostdriver-asyncio.svg\n :target: https://pypi.python.org/pypi/mattermostdriver-asyncio\n\n.. image:: https://img.shields.io/pypi/l/mattermostdriver-asyncio.svg\n :target: https://pypi.python.org/pypi/mattermostdriver-asyncio\n\n.. image:: https://img.shields.io/pypi/pyversions/mattermostdriver-asyncio.svg\n :target: https://pypi.python.org/pypi/mattermostdriver-asyncio\n\nPython Mattermost Driver (now with asyncio!)(APIv4)\n===================================================\n\nInfo\n----\n\nThe repository will try to keep up with the master of https://github.com/mattermost/mattermost-api-reference\n\nIf something changes, it is most likely to change because the official mattermost api changed.\n\nInstallation\n------------\n\n.. inclusion-marker-start-install\n\n``pip install mattermostdriver-asyncio``\n\n.. inclusion-marker-end-install\n\nDocumentation\n-------------\nDocumentation can be found at https://vaelor.github.io/python-mattermost-driver/ .\n\nUsage\n-----\n\n.. inclusion-marker-start-usage\n\n.. code:: python\n\n from mattermostdriver import Driver\n\n foo = Driver({\n # Required options\n 'url': 'mattermost.server.com',\n 'login_id': 'user.name',\n 'password': 'verySecret',\n # Instead of login/password you can also use a personal access token\n 'token': 'YourPersonalAccessToken',\n # Optional / defaults to\n 'scheme': 'https',\n 'port': 8065,\n 'basepath': '/api/v4',\n # Use False if self signed/insecure certificate\n 'verify': True,\n # The interval the websocket will ping the server to keep the connection alive\n 'timeout': 30,\n 'mfa_token': 'YourMFAToken'\n })\n\n # Most of the requests need you to be logged in, so calling login()\n # should be the first thing you do after you created your Driver instance.\n # login() returns the raw response\n # If using a personal access token, you still need to run login().\n # In this case, does not make a login request, but a `get_user('me')`\n # and sets everything up in the client.\n await foo.login()\n\n # You can make api calls by using calling `Driver.endpointofchoice`.\n # Using api[''] is deprecated for 5.0.0!\n # So, for example, if you used `Driver.api['users'].get_user('me')` before,\n # you now just do `Driver.users.get_user('me')`.\n # The names of the endpoints and requests are almost identical to\n # the names on the api.mattermost.com/v4 page.\n # API calls always return the json the server send as a response.\n await foo.users.get_user_by_username('another.name')\n\n # If the api request needs additional parameters\n # you can pass them to the function in the following way:\n # - Path parameters are always simple parameters you pass to the function\n await foo.users.get_user(user_id='me')\n\n # - Query parameters are always passed by passing a `params` dict to the function\n await foo.teams.get_teams(params={...})\n\n # - Request Bodies are always passed by passing an `options` dict or array to the function\n await foo.channels.create_channel(options={...})\n\n # See the mattermost api documentation to see which parameters you need to pass.\n await foo.channels.create_channel(options={\n 'team_id': 'some_team_id',\n 'name': 'awesome-channel',\n 'display_name': 'awesome channel',\n 'type': 'O'\n })\n\n # If you want to make a websocket connection to the mattermost server\n # you can call the init_websocket method, passing an event_handler.\n # Every Websocket event send by mattermost will be send to that event_handler.\n # See the API documentation for which events are available.\n async def event_handler(message):\n pass\n\n await foo.init_websocket(event_handler)\n\n # To upload a file you will need to pass a `files` dictionary\n channel_id = foo.channels.get_channel_by_name_and_team_name('team', 'channel')['id']\n await file_id = foo.files.upload_file(\n channel_id=channel_id\n files={'files': (filename, open(filename))})['file_infos'][0]['id']\n\n # track the file id and pass it in `create_post` options, to attach the file\n await foo.posts.create_post(options={\n 'channel_id': channel_id,\n 'message': 'This is the important file',\n 'file_ids': [file_id]})\n # If needed, you can make custom requests by calling `make_request`\n await foo.client.make_request('post', '/endpoint', options=None, params=None, data=None, files=None, basepath=None)\n # If you want to call a webhook/execute it use the `call_webhook` method.\n # This method does not exist on the mattermost api AFAIK, I added it for ease of use.\n await foo.hooks.call_webhook('myHookId', options) # Options are optional\n\n\n.. inclusion-marker-end-usage\n\nAvailable endpoints:\n''''''''''''''''''''\n\n- base\n- brand\n- channels\n- cluster\n- commands\n- compliance\n- elasticsearch\n- emoji\n- files\n- ldap\n- oauth\n- posts\n- preferences\n- saml\n- system\n- teams\n- users\n- webhooks\n- data_retention\n\nSee https://api.mattermost.com/v4/ to see which api requests are\navailable.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mattermostdriver-asyncio", "package_url": "https://pypi.org/project/mattermostdriver-asyncio/", "platform": "", "project_url": "https://pypi.org/project/mattermostdriver-asyncio/", "project_urls": null, "release_url": "https://pypi.org/project/mattermostdriver-asyncio/5.1.0/", "requires_dist": null, "requires_python": "", "summary": "An asyncio Python Mattermost Driver", "version": "5.1.0" }, "last_serial": 3425230, "releases": { "5.0.0": [ { "comment_text": "", "digests": { "md5": "97150d53ce9a1050efb71ddc57524739", "sha256": "4b5275f6d56e3979638c377d9a08fe952665e6e84323b5dc74a1cff1f07de62d" }, "downloads": -1, "filename": "mattermostdriver_asyncio-5.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "97150d53ce9a1050efb71ddc57524739", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 21698, "upload_time": "2017-12-07T15:32:49", "url": "https://files.pythonhosted.org/packages/33/83/75c5f4bb80f337aa745e910ce874216ec1aab8ed68eb27d81c61514d47be/mattermostdriver_asyncio-5.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17848f5e34f312f3e039f539246ad644", "sha256": "8c4fd5aa464b244e928b494e124acc4489d2ac4040dc1298d3d787fe7e96f655" }, "downloads": -1, "filename": "mattermostdriver-asyncio-5.0.0.tar.gz", "has_sig": false, "md5_digest": "17848f5e34f312f3e039f539246ad644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15349, "upload_time": "2017-12-07T15:32:47", "url": "https://files.pythonhosted.org/packages/10/25/60867250b4e3c27b9d2c716970f91c4eaecd22943b128f1e101f2a51068e/mattermostdriver-asyncio-5.0.0.tar.gz" } ], "5.0.1": [ { "comment_text": "", "digests": { "md5": "4cad49cc1955688a5eff3f306f8c48de", "sha256": "46ab890ddd1155f6d649a430386bfd4e9cd2b31fd8cd85ef98486f03c4626bff" }, "downloads": -1, "filename": "mattermostdriver_asyncio-5.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4cad49cc1955688a5eff3f306f8c48de", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 21728, "upload_time": "2017-12-07T15:41:37", "url": "https://files.pythonhosted.org/packages/d7/55/8003d6efaa0bc8837e07ffcd2034ab5f5274369369e7f26317affec32204/mattermostdriver_asyncio-5.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf91c3c0376e28467aef4f1bc2ccf698", "sha256": "0f0cb8b834ac79bfeb32a3efd5ab9e6680791d17685447406e81fc5da12a49b8" }, "downloads": -1, "filename": "mattermostdriver-asyncio-5.0.1.tar.gz", "has_sig": false, "md5_digest": "bf91c3c0376e28467aef4f1bc2ccf698", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15419, "upload_time": "2017-12-07T15:41:35", "url": "https://files.pythonhosted.org/packages/eb/e8/74c8c2266fb2d661a8d96b3e1d39d7509c3cf234ed89fa175669e19aaebb/mattermostdriver-asyncio-5.0.1.tar.gz" } ], "5.1.0": [ { "comment_text": "", "digests": { "md5": "db88b9257af836343c6c26f5e4aa7a3b", "sha256": "6798475bb4368982580573db7c8bc1003abf7b75c1ab7249760444320c1a67cb" }, "downloads": -1, "filename": "mattermostdriver_asyncio-5.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db88b9257af836343c6c26f5e4aa7a3b", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 21751, "upload_time": "2017-12-18T15:48:42", "url": "https://files.pythonhosted.org/packages/81/b3/e5b241d2b7eb9a4f94f2bb07ed8300ec646ceb919ac09d7cd2f029dca371/mattermostdriver_asyncio-5.1.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db88b9257af836343c6c26f5e4aa7a3b", "sha256": "6798475bb4368982580573db7c8bc1003abf7b75c1ab7249760444320c1a67cb" }, "downloads": -1, "filename": "mattermostdriver_asyncio-5.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db88b9257af836343c6c26f5e4aa7a3b", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 21751, "upload_time": "2017-12-18T15:48:42", "url": "https://files.pythonhosted.org/packages/81/b3/e5b241d2b7eb9a4f94f2bb07ed8300ec646ceb919ac09d7cd2f029dca371/mattermostdriver_asyncio-5.1.0-py3-none-any.whl" } ] }