{ "info": { "author": "Department for International Trade", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# directory-sso-api-client\n\n[![code-climate-image]][code-climate]\n[![circle-ci-image]][circle-ci]\n[![codecov-image]][codecov]\n[![pypi-image]][pypi]\n[![semver-image]][semver]\n\n**[Directory SSO API client](https://great.gov.uk/)**\n\n---\n\n## Installation\n\n```sh\n $ pip install directory-sso-api-client\n```\n\nThe api client expects the following settings:\n\n| Setting | Notes |\n| ---------------------------------------- | ----------------------------------------------------------- |\n| DIRECTORY_SSO_API_CLIENT_BASE_URL | |\n| DIRECTORY_SSO_API_CLIENT_API_KEY | Unique to client. Retrieved during the on-boarding process. |\n| DIRECTORY_SSO_API_CLIENT_SENDER_ID | Unique to client. Retrieved during the on-boarding process. |\n| DIRECTORY_SSO_API_CLIENT_DEFAULT_TIMEOUT | |\n\nOnce that is done the API client can be used:\n\n```py\nfrom directory_sso_api_client.client import sso_api_client\n```\n\n## Authentication backend\n\nAdd the following to your settings\n\n```\nAUTHENTICATION_BACKENDS = ['directory_sso_api_client.backends.SSOUserBackend']\n\nAUTH_USER_MODEL='directory_sso_api_client.SSOUser',\n\nMIDDLEWARE_CLASSES = [\n ...\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n ...\n```\n\nThat will result in the user being authenticate via their sso session cookie and then attached to `request.user`.\n\n## Development\n\n```shell\n$ git clone https://github.com/uktrade/directory-sso-api-client\n$ cd directory-sso-api-client\n$ [create virtual environment and activate]\n$ pip install -r requirements_test.txt\n```\n\n## Publish to PyPI\n\nThe package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:\n\n| Setting |\n| --------------------------- |\n| DIRECTORY_PYPI_USERNAME |\n| DIRECTORY_PYPI_PASSWORD |\n\nThen run the following command:\n```sh\n make publish\n```\n\n\n[code-climate-image]: https://codeclimate.com/github/uktrade/directory-sso-api-client/badges/issue_count.svg\n[code-climate]: https://codeclimate.com/github/uktrade/directory-sso-api-client\n\n[circle-ci-image]: https://circleci.com/gh/uktrade/directory-sso-api-client/tree/master.svg?style=svg\n[circle-ci]: https://circleci.com/gh/uktrade/directory-sso-api-client/tree/master\n\n[codecov-image]: https://codecov.io/gh/uktrade/directory-sso-api-client/branch/master/graph/badge.svg\n[codecov]: https://codecov.io/gh/uktrade/directory-sso-api-client\n\n[pypi-image]: https://badge.fury.io/py/directory-sso-api-client.svg\n[pypi]: https://badge.fury.io/py/directory-sso-api-client\n\n[semver-image]: https://img.shields.io/badge/Versioning%20strategy-SemVer-5FBB1C.svg\n[semver]: https://semver.org\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/uktrade/directory-sso-api-client", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "directory-sso-api-client", "package_url": "https://pypi.org/project/directory-sso-api-client/", "platform": "", "project_url": "https://pypi.org/project/directory-sso-api-client/", "project_urls": { "Homepage": "https://github.com/uktrade/directory-sso-api-client" }, "release_url": "https://pypi.org/project/directory-sso-api-client/6.2.0/", "requires_dist": [ "directory-client-core (<7.0.0,>=6.0.0)", "django (<3.0a1,>=2.2) ; extra == 'test'", "requests (<3.0.0,>=2.18.4) ; extra == 'test'", "pytest (==3.6.0) ; extra == 'test'", "pytest-cov (==2.3.1) ; extra == 'test'", "flake8 (==3.0.4) ; extra == 'test'", "requests-mock (==1.1.0) ; extra == 'test'", "codecov (==2.0.9) ; extra == 'test'", "twine (<2.0.0,>=1.11.0) ; extra == 'test'", "wheel (<1.0.0,>=0.31.0) ; extra == 'test'", "setuptools (<39.0.0,>=38.6.0) ; extra == 'test'", "pytest-django (<4.0.0,>=3.2.1) ; extra == 'test'", "pytest-sugar (<1.0.0,>=0.9.1) ; extra == 'test'" ], "requires_python": "", "summary": "Python API client for Export Directory.", "version": "6.2.0" }, "last_serial": 5896025, "releases": { "2.4.1": [ { "comment_text": "", "digests": { "md5": "25e7c23e5b5e5a9f1489a4781c7b8c5a", "sha256": "c054bc6e8cbfa08689a5866eb0175deaf45206a880d90420d24430b72ba52268" }, "downloads": -1, "filename": "directory_sso_api_client-2.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "25e7c23e5b5e5a9f1489a4781c7b8c5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7583, "upload_time": "2018-03-06T11:29:15", "url": "https://files.pythonhosted.org/packages/1f/ae/fe074e6872b59f50390f40a43a4d05f1e2f7e8795b48df92eaffefe3df5b/directory_sso_api_client-2.4.1-py3-none-any.whl" } ], "2.5.0": [ { "comment_text": "", "digests": { "md5": "f454e5102df0be68d2d8be89d56f7447", "sha256": "f38f9192e5dbfa4a6d4ca68c91fa5036efa29550ff5aab0e6488d63a70aa932a" }, "downloads": -1, "filename": "directory_sso_api_client-2.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f454e5102df0be68d2d8be89d56f7447", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6371, "upload_time": "2018-03-06T13:48:58", "url": "https://files.pythonhosted.org/packages/ab/aa/de3b9edacb851e02e02959584e44520b9d747d2e528951c40a4a3a0fb656/directory_sso_api_client-2.5.0-py3-none-any.whl" } ], "2.5.1": [ { "comment_text": "", "digests": { "md5": "2ada10b45d122512366edae7c3155c1d", "sha256": "68a0ec38dc7e6ce4d4226779ef8b56f58dc1396771320f9acb1f4e45775f40a2" }, "downloads": -1, "filename": "directory_sso_api_client-2.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2ada10b45d122512366edae7c3155c1d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6048, "upload_time": "2018-03-06T22:13:42", "url": "https://files.pythonhosted.org/packages/a1/af/3ea22dfb0225d068cac395bd6e69a3e7f1f2deac5a4947494c0c08428655/directory_sso_api_client-2.5.1-py3-none-any.whl" } ], "2.5.2": [ { "comment_text": "", "digests": { "md5": "befb39ae9a9353f57fe0996ae48a1eed", "sha256": "86e075d5a8b0acb8c157311fd04ecdc887e4aac86ecd9db0191c1dc6e65b748a" }, "downloads": -1, "filename": "directory_sso_api_client-2.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "befb39ae9a9353f57fe0996ae48a1eed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6047, "upload_time": "2018-07-23T13:50:15", "url": "https://files.pythonhosted.org/packages/1c/89/83208c75f7ae7163557eda5d8266d4045b9b877938b2ef8d15131c031404/directory_sso_api_client-2.5.2-py3-none-any.whl" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "9816c170b7db48bdcd18868639fef040", "sha256": "082494e09c54651be169957fca18755c3eaddfbd59a8544db42004f7999fc265" }, "downloads": -1, "filename": "directory_sso_api_client-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9816c170b7db48bdcd18868639fef040", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6018, "upload_time": "2018-08-02T12:30:12", "url": "https://files.pythonhosted.org/packages/ac/26/24c10c5e9b3de7f82307a811717a3b8c7c3b8b85d48d56a27de45ca62636/directory_sso_api_client-3.0.0-py3-none-any.whl" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "c1b6634deb1b8e7a16f4fc6d7c67106b", "sha256": "22ab6f041c644528a3237491b3938b7af4faa1cd157f5a7c32296957b6908837" }, "downloads": -1, "filename": "directory_sso_api_client-3.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c1b6634deb1b8e7a16f4fc6d7c67106b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6039, "upload_time": "2018-08-03T16:49:50", "url": "https://files.pythonhosted.org/packages/bc/27/c8d1370d46f3998fd91fbf276fbdee5c539dfcda1eb26d5ed23dd6ad08da/directory_sso_api_client-3.0.1-py3-none-any.whl" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "a4f7b55c05ed706f79d2b9124bf61a25", "sha256": "a496effd3b493300c4e4800f0cef16fbbce434e5d68d7403f5745654b96b72cd" }, "downloads": -1, "filename": "directory_sso_api_client-3.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a4f7b55c05ed706f79d2b9124bf61a25", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6042, "upload_time": "2018-08-06T11:27:01", "url": "https://files.pythonhosted.org/packages/51/35/9d017f556862b047120b054024fc50c4092e88f9ba7eb0cf2258fec1d8b1/directory_sso_api_client-3.0.2-py3-none-any.whl" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "84a9b14206eac36ddcf5015687c68fc0", "sha256": "9f474280a020d576e63dce4952c1afba87412dfc21c35ea3fd46f770ddabd7cc" }, "downloads": -1, "filename": "directory_sso_api_client-3.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "84a9b14206eac36ddcf5015687c68fc0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6179, "upload_time": "2019-01-25T09:21:37", "url": "https://files.pythonhosted.org/packages/7a/3a/9809481bb6c25e9a79f08baaad4375554da2b5ab95c443f6526fd81096f4/directory_sso_api_client-3.1.0-py3-none-any.whl" } ], "3.2.0": [ { "comment_text": "", "digests": { "md5": "3cb40948f77546a23320aa99548d6543", "sha256": "6e88faece0af374a5334df9a55217dcdab03dcbd787140fe8928bf1ba2eb2174" }, "downloads": -1, "filename": "directory_sso_api_client-3.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3cb40948f77546a23320aa99548d6543", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6208, "upload_time": "2019-01-28T17:56:39", "url": "https://files.pythonhosted.org/packages/20/6e/ed6dfa11072e1124ffa24e197647e428bd05fcc28fdbfb11ba27a1c0b65f/directory_sso_api_client-3.2.0-py3-none-any.whl" } ], "4.0.0": [ { "comment_text": "", "digests": { "md5": "cd41b30fcd4d9ab0c62c56943a486037", "sha256": "77014e0bec4ca2a2f84c58bad03f56cb89c75c11dc76b8505d78687cfd783a97" }, "downloads": -1, "filename": "directory_sso_api_client-4.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cd41b30fcd4d9ab0c62c56943a486037", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6196, "upload_time": "2019-02-06T16:33:46", "url": "https://files.pythonhosted.org/packages/a0/31/4cc69f0a58cd1ce08246508c126ed3bee8220cd4dcecb34377ddc395c941/directory_sso_api_client-4.0.0-py3-none-any.whl" } ], "4.1.0": [ { "comment_text": "", "digests": { "md5": "c671846a6fe9ca7e3246ad32bdcd9f7c", "sha256": "d2009f855cf7b41241e22dca7c5f97b4049fe5753e5f7bc9fc24724c05ed12e7" }, "downloads": -1, "filename": "directory_sso_api_client-4.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c671846a6fe9ca7e3246ad32bdcd9f7c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6206, "upload_time": "2019-02-22T13:31:42", "url": "https://files.pythonhosted.org/packages/75/a1/9cf319e655547bc0adebd489ee9e9a2ec3913c0ae2eb29a97cae140db57e/directory_sso_api_client-4.1.0-py3-none-any.whl" } ], "4.1.1": [ { "comment_text": "", "digests": { "md5": "3e94a0fb576f484820903133c1cf3d7b", "sha256": "321093554b9f3d5bef1c8d81bf50cc3917290ff383a8eab7deaae993af3fc6f0" }, "downloads": -1, "filename": "directory_sso_api_client-4.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3e94a0fb576f484820903133c1cf3d7b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6196, "upload_time": "2019-02-25T14:37:27", "url": "https://files.pythonhosted.org/packages/1d/13/831fb05793b52ad2fc1f38c6696cc56bf7e884efa67ff61d3272603bd6d1/directory_sso_api_client-4.1.1-py3-none-any.whl" } ], "5.0.0": [ { "comment_text": "", "digests": { "md5": "c8a35926dbd7e6ea362ce3244edea88f", "sha256": "a7d8d3f7475c2436ef08f47885f99444d1483b8b666ff0f69e5f97b78d4ebf9f" }, "downloads": -1, "filename": "directory_sso_api_client-5.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c8a35926dbd7e6ea362ce3244edea88f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5599, "upload_time": "2019-04-23T13:52:55", "url": "https://files.pythonhosted.org/packages/76/a7/76249af5dd31209f8c68994bd3e95eae1eb97f4c1865b7a01bc7a12588f2/directory_sso_api_client-5.0.0-py3-none-any.whl" } ], "5.0.1": [ { "comment_text": "", "digests": { "md5": "896acb1d0a33127d9daa41f88d314e4d", "sha256": "c57c14fbbc01925c63c8acbf24b3bdfe9ef1b7b359911ae0fd7d958913cfb1a8" }, "downloads": -1, "filename": "directory_sso_api_client-5.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "896acb1d0a33127d9daa41f88d314e4d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5498, "upload_time": "2019-07-04T14:43:05", "url": "https://files.pythonhosted.org/packages/87/e8/7240b442cfd30fa9e804fe2a3ce7f8168bb41104c7adcef4090aa0d00e6c/directory_sso_api_client-5.0.1-py3-none-any.whl" } ], "5.1.0": [ { "comment_text": "", "digests": { "md5": "5045f6d7712e2ac220ecd44b54d12fc3", "sha256": "a481974d5be5b405ebfdce8523cd3a3bdc0350033ebef46edd28a4e6dfc07c80" }, "downloads": -1, "filename": "directory_sso_api_client-5.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5045f6d7712e2ac220ecd44b54d12fc3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7417, "upload_time": "2019-07-16T13:58:09", "url": "https://files.pythonhosted.org/packages/5c/73/2adbef28ac0fc6e5d78f36cd2db5908a8ce9b6a09ee57f07c37030f2f615/directory_sso_api_client-5.1.0-py3-none-any.whl" } ], "5.1.1": [ { "comment_text": "", "digests": { "md5": "672d36dfd64b819f4f93589001d03024", "sha256": "57844197902b4ff04042b5b47f0e697fc8d1c97a2d78b70e260c71a1dd5e6110" }, "downloads": -1, "filename": "directory_sso_api_client-5.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "672d36dfd64b819f4f93589001d03024", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7455, "upload_time": "2019-07-17T09:09:14", "url": "https://files.pythonhosted.org/packages/43/f1/379ef1af931f90cf79a403d0b7b05d78950365466b457537e605c278b0ba/directory_sso_api_client-5.1.1-py3-none-any.whl" } ], "6.0.0": [ { "comment_text": "", "digests": { "md5": "15d47050a91ef14bc7fbc5920c32292e", "sha256": "f5e2665fa999468b93a2131335149c5153fd3e21841fe4d4e8f444c74481dae3" }, "downloads": -1, "filename": "directory_sso_api_client-6.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "15d47050a91ef14bc7fbc5920c32292e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7452, "upload_time": "2019-07-17T09:58:26", "url": "https://files.pythonhosted.org/packages/7f/8b/70c6512bd1d2426fa1a4f6b61c84e68e19301ef8d4c8411b5f0956f4ed60/directory_sso_api_client-6.0.0-py3-none-any.whl" } ], "6.0.1": [ { "comment_text": "", "digests": { "md5": "94a0d649243f849bc5081d29438aa2f8", "sha256": "44de91247f25a5888064bc464a1b9746ad72d1139cc5634cdffe46d97de6a82f" }, "downloads": -1, "filename": "directory_sso_api_client-6.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "94a0d649243f849bc5081d29438aa2f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7520, "upload_time": "2019-07-18T08:45:34", "url": "https://files.pythonhosted.org/packages/f8/3e/f085b2c850d537795ca34a65a1b9fda0f3553db7c815d77ada46fd6c6c4b/directory_sso_api_client-6.0.1-py3-none-any.whl" } ], "6.1.0": [ { "comment_text": "", "digests": { "md5": "1fab5b9a6eca854b666c1b0c33b3e781", "sha256": "3542688421e580e666a6b0140fea8b83beea1b3f621bec3d7be1452df0944ad0" }, "downloads": -1, "filename": "directory_sso_api_client-6.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1fab5b9a6eca854b666c1b0c33b3e781", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7544, "upload_time": "2019-09-09T09:45:43", "url": "https://files.pythonhosted.org/packages/81/bf/91fad5268fdc1502bc5d8fff72c530d462c8aee0c0ae84c422aa17d08218/directory_sso_api_client-6.1.0-py3-none-any.whl" } ], "6.2.0": [ { "comment_text": "", "digests": { "md5": "87f071b570ee795879f4337777653e43", "sha256": "a777dbe75a928ea2c02aedf7d55347e9c43e2b047f4f5645207227ab84f71ed6" }, "downloads": -1, "filename": "directory_sso_api_client-6.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "87f071b570ee795879f4337777653e43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7672, "upload_time": "2019-09-27T13:08:50", "url": "https://files.pythonhosted.org/packages/41/67/ae78052ecb8831c1996087c4373b202e991999fd1ee7c227e6737c28b7a4/directory_sso_api_client-6.2.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87f071b570ee795879f4337777653e43", "sha256": "a777dbe75a928ea2c02aedf7d55347e9c43e2b047f4f5645207227ab84f71ed6" }, "downloads": -1, "filename": "directory_sso_api_client-6.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "87f071b570ee795879f4337777653e43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7672, "upload_time": "2019-09-27T13:08:50", "url": "https://files.pythonhosted.org/packages/41/67/ae78052ecb8831c1996087c4373b202e991999fd1ee7c227e6737c28b7a4/directory_sso_api_client-6.2.0-py3-none-any.whl" } ] }