{ "info": { "author": "tCell.io", "author_email": "support@tcell.io", "bugtrack_url": null, "classifiers": [], "description": "By [TCell](https://www.tcell.io/).\n\nTCell Hooks is to be used in conjuction with the [tcell_agent](https://pypi.python.org/pypi/tcell_agent) to allow for custom event notifications of login failures and login successes.\n\n## Getting started\n\nYou can add it to your requirements.txt file with:\n\n```python\ntcell_hooks==1.0.0\n```\n\nThen run `pip install -r requirements.txt`\n\nThere are two options for calling the hooks from your application code:\n\nBy providing a Django/Flask request object and having the TCell Agent extract the relevant details from it:\n\n```python\nfrom tcell_hooks.v1 import send_django_login_event, LOGIN_SUCCESS\n\nsend_django_login_event(\n status=LOGIN_SUCCESS,\n django_request=request,\n user_id=\"tcell@tcell.io\",\n session_id=\"124KDJFL3234\"\n)\n```\n\n```python\nfrom tcell_hooks.v1 import send_flask_login_event, LOGIN_SUCCESS\n\nsend_flask_login_event(\n status=LOGIN_SUCCESS,\n flask_request=request,\n user_id=\"tcell@tcell.io\",\n session_id=\"124KDJFL3234\"\n)\n```\n\nOr by providing each individual piece of information required for the TCell event:\n\n```python\nfrom tcell_hooks.v1 import send_login_event, LOGIN_SUCCESS\n\nsend_login_event(\n status=LOGIN_SUCCESS,\n session_id=\"124KDJFL3234\",\n user_agent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) ...\",\n referrer=\"http://192.168.99.100:3000/\",\n remote_address=\"192.168.99.1\",\n header_keys=[\"HOST\", \"USER_AGENT\", \"ACCEPT\", \"REFERER\", \"ACCEPT_ENCODING\", \"ACCEPT_LANGUAGE\", \"COOKIE\"],\n user_id=\"tcell@tcell.io\",\n document_uri=\"/users/auth/doorkeeper/callbackuri\"\n)\n```\n\nThe available statuses are:\n\n`LOGIN_SUCCESS`\n\n`LOGIN_FAILURE`\n\n\n## Important Note\n\nIf the [tcell_agent](https://pypi.python.org/pypi/tcell_agent) is not installed or if it's disabled, this code will do nothing and should have no performance effect on your app.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://tcell.io", "keywords": null, "license": "No License", "maintainer": null, "maintainer_email": null, "name": "tcell_hooks", "package_url": "https://pypi.org/project/tcell_hooks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tcell_hooks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://tcell.io" }, "release_url": "https://pypi.org/project/tcell_hooks/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Allows custom event sending of login failures/success to TCell", "version": "1.0.0" }, "last_serial": 5676568, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "530b87fc6f97ada5fcd4509bff8326a2", "sha256": "c06df33885719aaf7ecf49dd296895721a0a775e944affd22a718682502a41cf" }, "downloads": -1, "filename": "tcell_hooks-1.0.0.tar.gz", "has_sig": false, "md5_digest": "530b87fc6f97ada5fcd4509bff8326a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2466, "upload_time": "2017-06-12T22:13:55", "url": "https://files.pythonhosted.org/packages/1a/d5/63a38e5665978eaa3d8f4ace1adda65333c9c63ad5a285586a98fb9e5c42/tcell_hooks-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "530b87fc6f97ada5fcd4509bff8326a2", "sha256": "c06df33885719aaf7ecf49dd296895721a0a775e944affd22a718682502a41cf" }, "downloads": -1, "filename": "tcell_hooks-1.0.0.tar.gz", "has_sig": false, "md5_digest": "530b87fc6f97ada5fcd4509bff8326a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2466, "upload_time": "2017-06-12T22:13:55", "url": "https://files.pythonhosted.org/packages/1a/d5/63a38e5665978eaa3d8f4ace1adda65333c9c63ad5a285586a98fb9e5c42/tcell_hooks-1.0.0.tar.gz" } ] }