{ "info": { "author": "Ian Sparks", "author_email": "isparks@mdsol.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# requests-mauth\n\nrequests-mauth is a python requests (http://docs.python-requests.org/en/latest/) Authentication implementation\nfor Medidata's _MAuth_ authentication system.\n\n## Pre-requisites ##\n\nTo use MAuth authentication you will need:\n\n* An MAuth APP ID\n* An MAuth private key (with the public key registered with Medidata's MAuth server)\n\n\n## Using ##\n\n import requests\n from requests_mauth import MAuth\n\n APP_UUID = '55dc88ec-c109-11e1-84f6-1231381b7d70'\n private_key = open(\"private.key\",\"r\").read()\n\n mauth = MAuth(APP_UUID, private_key)\n\n\n # Call an MAuth protected resource, in this case an iMedidata API \n # listing the studies for a particular user\n user_uuid = '10ac3b0e-9fe2-11df-a531-12313900d531'\n url = \"https://innovate.imedidata.com/api/v2/users/%s/studies.json\" % user_uuid\n\n # Make the requests call, passing the auth client\n result = requests.get(url, auth=mauth)\n\n # Print results\n if result.status_code == 200:\n print([r['uuid'] for r in result.json()['studies']])\n print(result.text)\n\nDevelopment\n-----------\nWe use [travis](https://travisci.com) for automated CI of the code (and status checks are required to pass prior to PR merges being accepted). \nWe use travis to deploy updated versions to PyPI (only from `master`)\n\nFor local development (cross version) we use [tox](http://tox.readthedocs.io/en/latest/) with [pyenv](https://github.com/pyenv/pyenv) to automate the running of unittests against different python versions in virtualised python environments. \n\nTo setup your environment:\n1. Install Python\n1. Install Pyenv\n ```bash\n $ brew update\n $ brew install pyenv\n ```\n1. Install Pyenv versions for the Tox Suite\n ```bash\n $ pyenv install 2.7.13 3.3.6 3.4.6 3.5.3 3.6.1\n ```\n1. Install Tox \n ```bash\n $ pip install tox tox-pyenv \n ```\n1. Setup the local project versions (one for each env in the `envlist`)\n ```bash\n $ pyenv local 2.7.13 3.3.6 3.4.6 3.5.3 3.6.1 \n ```\n1. Make any changes, update the tests and then run tests with `tox`\n ```bash\n Name Stmts Miss Cover\n ------------------------------------------------\n requests_mauth/__init__.py 3 0 100%\n requests_mauth/client.py 31 0 100%\n requests_mauth/rsa_sign.py 34 0 100%\n ------------------------------------------------\n TOTAL 68 0 100%\n stats runtests: commands[1] | coverage html\n _________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________\n clean: commands succeeded\n py27: commands succeeded\n py33: commands succeeded\n py34: commands succeeded\n py35: commands succeeded\n py36: commands succeeded\n stats: commands succeeded\n congratulations :)\n ```\n1. Coverage report can be viewed using `open htmlcov/index.html`\n1. Push your changes and create a PR to `master`\n1. Once the PR is complete, tag the branch and push it to github, this will trigger Travis to deploy to PyPI (make sure the version is consistent)\n ```bash\n $ git checkout master\n $ git pull\n $ git tag -a 1.0.2 -m \"Requests MAuth 1.0.2\"\n $ git push --tags\n ```\n\nBuild Status\n------------\n* master - [![Build Status](https://travis-ci.org/mdsol/requests-mauth.svg?branch=master)](https://travis-ci.org/mdsol/requests-mauth.svg?branch=master)\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mdsol/requests-mauth", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "requests_mauth", "package_url": "https://pypi.org/project/requests_mauth/", "platform": "", "project_url": "https://pypi.org/project/requests_mauth/", "project_urls": { "Homepage": "https://github.com/mdsol/requests-mauth" }, "release_url": "https://pypi.org/project/requests_mauth/1.0.3/", "requires_dist": [ "rsa", "requests" ], "requires_python": "", "summary": "An MAuth client based around the excellent requests library.", "version": "1.0.3" }, "last_serial": 3694652, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2c84ec188db05aff6ad4060efd86601b", "sha256": "9a3732d938628e7ece08a0e8c48fba97cedf4501540dda196018e35a97613a6d" }, "downloads": -1, "filename": "requests_mauth-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2c84ec188db05aff6ad4060efd86601b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4522, "upload_time": "2015-11-27T14:32:18", "url": "https://files.pythonhosted.org/packages/fe/ef/026549dae07d45110403242b2680b90e1b9527d7b9abf850e8623ce739b6/requests_mauth-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ca2af8aba86bb38a8d00931bbba97f46", "sha256": "1039d5a273fd01c509f31ca0bdb356090b36dac772baf1e2e259e2cc75e58401" }, "downloads": -1, "filename": "requests_mauth-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ca2af8aba86bb38a8d00931bbba97f46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4772, "upload_time": "2016-11-28T09:10:57", "url": "https://files.pythonhosted.org/packages/69/40/e7a91de45091129f54fe7baa9533b659cad6805d7acfef4c730963c8703a/requests_mauth-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "143e70887f2006618c1f13b96fcd79f5", "sha256": "6242329e381b410c714f9ddd828745cfcd632c5495d9432bc424b3c7c232ea99" }, "downloads": -1, "filename": "requests_mauth-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "143e70887f2006618c1f13b96fcd79f5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7863, "upload_time": "2017-09-01T13:36:57", "url": "https://files.pythonhosted.org/packages/d0/b2/4dffa8192bb2dfe74a4ac9f7cd4d49644f629060a8b1bbbf4141f4b75c1b/requests_mauth-1.0.2-py2.py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "0dc4b3d92df6d0a7422c5620e5e065b0", "sha256": "bb73fc14cf18515b4b5ea81f2e80659e34fca9a75a243421b66f0a62c33e394d" }, "downloads": -1, "filename": "requests_mauth-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0dc4b3d92df6d0a7422c5620e5e065b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7864, "upload_time": "2018-03-22T08:52:28", "url": "https://files.pythonhosted.org/packages/33/be/cf8fe5dd2469f671003e5e703329c9ba49901a690855d2d86a08af64fbd5/requests_mauth-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1a30b593e6cb500df9a53588bd927f9", "sha256": "a04a676bb47dcda15d595f3c408c002cd8e7d30eb29ffa03dee5453f5a72a500" }, "downloads": -1, "filename": "requests_mauth-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e1a30b593e6cb500df9a53588bd927f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5758, "upload_time": "2018-03-22T08:52:30", "url": "https://files.pythonhosted.org/packages/8a/13/ad5d8e2e08fc36e715743a92e7ebd096410ece5e9e94366003f3b7a185b4/requests_mauth-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0dc4b3d92df6d0a7422c5620e5e065b0", "sha256": "bb73fc14cf18515b4b5ea81f2e80659e34fca9a75a243421b66f0a62c33e394d" }, "downloads": -1, "filename": "requests_mauth-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0dc4b3d92df6d0a7422c5620e5e065b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7864, "upload_time": "2018-03-22T08:52:28", "url": "https://files.pythonhosted.org/packages/33/be/cf8fe5dd2469f671003e5e703329c9ba49901a690855d2d86a08af64fbd5/requests_mauth-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1a30b593e6cb500df9a53588bd927f9", "sha256": "a04a676bb47dcda15d595f3c408c002cd8e7d30eb29ffa03dee5453f5a72a500" }, "downloads": -1, "filename": "requests_mauth-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e1a30b593e6cb500df9a53588bd927f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5758, "upload_time": "2018-03-22T08:52:30", "url": "https://files.pythonhosted.org/packages/8a/13/ad5d8e2e08fc36e715743a92e7ebd096410ece5e9e94366003f3b7a185b4/requests_mauth-1.0.3.tar.gz" } ] }