{ "info": { "author": "Merlijn van Deen", "author_email": "valhallasw@arctus.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[![PyPI version](https://badge.fury.io/py/flask-mwoauth.svg)](https://pypi.org/project/flask-mwoauth/)\n\nflask-mwoauth\n--------------\nFlask blueprint to run OAuth against MediaWiki's extension:OAuth.\n\nThe blueprint adds these uris:\n - /login - runs the OAuth handshake and returns the user to /\n - /login?next=/someurl will return the user to /someurl\n - /logout - clears the users' access tokens\n - /logout?next=/someurl will return the user to /someurl\n - /oauth-callback - callback from MW to finish the handshake\n\nThe users' OAuth key and secret are stored in the session.\n\n\nIn addition, flask-mwoauth adds a few convenience functions:\n\n1. `get_current_user(cached=True)` reports who the current user is. To confirm\n the user is still logged in (e.g. tokens have not been revoked), call it\n with cached=False.\n\n2. `request(api_query)` submits an request through the API, using the users' access tokens. For instance,\n\n```\nresult = request({'action': 'query', 'meta': 'userinfo'})\n```\n\nfetches https://www.mediawiki.org/w/api.php?action=query&meta=userinfo and returns the result as Python dict, e.g.\n\n```\n{u'batchcomplete': u'', u'query': {u'userinfo': {u'id': 31344, u'name': u'Valhallasw'}}}\n```\n\nIf you are authorized to access other wikis (e.g. en.wikipedia.org, although you authorized via mediawiki.org), you can run a request there using\n\n```\nresult = request({'action': 'query', 'meta': 'userinfo'}, url='https://en.wikipedia.org/w/api.php')\n```\n \nFor more information on using the api, please check the api documentation at https://www.mediawiki.org/wiki/API:Main_page\n \nThe example app\n---------------------\nAn example app is implemented in `demo.py`.\n\n1. Go to https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose and fill in the following values:\n - Application name: test app\n - Application description: test app for flask-mwoauth\n - OAuth \"callback\" URL: http://localhost:5000/oauth-callback\n - Contact email address: \n - Leave all other values default.\n\n2. Click 'Propose consumer'. You now get a message stating\n > Your OAuth consumer request has been received.\n >\n >You have been assigned a consumer token of **** and a secret token of ****. Please record these for future reference.\"\n\n3. Then\n ```\n $ python setup.py develop\n $ python demo.py\n NOTE: The callback URL you entered when proposing an OAuth consumer\n probably did not match the URL under which you are running this development\n server. Your redirect back will therefore fail -- please adapt the URL in\n your address bar to http://localhost:5000/oauth-callback?oauth_verifier=...etc\n \n Consumer key: \n Consumer secret: \n ```\n You may need to re-enter the key and secret if the app reloads.\n\n4. Go to [http://localhost:5000/](http://localhost:5000/) and click 'login'.\n\nProjects using flask-mwoauth\n----------------------------\nTo see how flask-mwoauth is used in applications, you can take a look at:\n * [mwoauth-test](https://github.com/CristianCantoro/mwoauth-test/)\n * [gerrit-patch-uploader](https://github.com/valhallasw/gerrit-patch-uploader):\n * [connecting the blueprint](https://github.com/valhallasw/gerrit-patch-uploader/blob/e90e5e3a8930124890c93e9c3174183a3defc794/patchuploader.py#L26),\n * [getting the logged in user](https://github.com/valhallasw/gerrit-patch-uploader/blob/e90e5e3a8930124890c93e9c3174183a3defc794/patchuploader.py#L53)\n * [wikipedia-tags-in-osm](https://github.com/CristianCantoro/wikipedia-tags-in-osm):\n * [querying the wiki](https://github.com/CristianCantoro/wikipedia-tags-in-osm/blob/wikimap/app/wiki.py#L363)\n * [editing a wiki](https://github.com/CristianCantoro/wikipedia-tags-in-osm/blob/wikimap/app/wiki.py#L497)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/valhallasw/flask-mwoauth", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flask-mwoauth", "package_url": "https://pypi.org/project/flask-mwoauth/", "platform": "", "project_url": "https://pypi.org/project/flask-mwoauth/", "project_urls": { "Homepage": "http://github.com/valhallasw/flask-mwoauth" }, "release_url": "https://pypi.org/project/flask-mwoauth/0.4.75/", "requires_dist": null, "requires_python": "", "summary": "Flask blueprint to connect to a MediaWiki OAuth server", "version": "0.4.75" }, "last_serial": 5593963, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "29ba0eb1f6074a8a367e1209947b2537", "sha256": "ebff8bfa6cc63c7b97dc4d0d40a252f15be5bcb1459bca5ca03c8af034416481" }, "downloads": -1, "filename": "flask-mwoauth-0.1.tar.gz", "has_sig": false, "md5_digest": "29ba0eb1f6074a8a367e1209947b2537", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2556, "upload_time": "2013-10-12T14:55:09", "url": "https://files.pythonhosted.org/packages/f8/37/07b3ff94b1c0eda640094dea036fac310cda1ea38d19642fc9455e7286b7/flask-mwoauth-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1c22f350ab38613c01304eca1b43f965", "sha256": "66f6e68d601d098d81adbd528e1fe99f0cd0408a026c6b042b3fa30b5fd3b006" }, "downloads": -1, "filename": "flask-mwoauth-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1c22f350ab38613c01304eca1b43f965", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2561, "upload_time": "2013-10-12T15:41:15", "url": "https://files.pythonhosted.org/packages/59/0d/206627b9ef37cca2c16e24e88587814b2ab193645155266bbc0f5dc6beb9/flask-mwoauth-0.1.1.tar.gz" } ], "0.1.14": [ { "comment_text": "", "digests": { "md5": "39e5f001bc63a306d14d1e041ba34db0", "sha256": "ce7a8748dce5791f72ae4b2abcb17d784647d5dbf2c4f9ba917353f6b14f1a62" }, "downloads": -1, "filename": "flask-mwoauth-0.1.14.tar.gz", "has_sig": false, "md5_digest": "39e5f001bc63a306d14d1e041ba34db0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2627, "upload_time": "2013-10-30T17:45:30", "url": "https://files.pythonhosted.org/packages/15/02/b6cc5084e089cb5b2e63b64c021f2b45932a3b5c1d7b560cc751bb3286f3/flask-mwoauth-0.1.14.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "acb3ef33708821559afd645fad2da932", "sha256": "a59a65fc11a3736f80868cddf5eaaa069bb20f0e3d947b1e7570d4b76a3e8668" }, "downloads": -1, "filename": "flask-mwoauth-0.1.2.tar.gz", "has_sig": false, "md5_digest": "acb3ef33708821559afd645fad2da932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2557, "upload_time": "2013-10-15T19:00:18", "url": "https://files.pythonhosted.org/packages/66/47/d441261fc6e39ba2589d9ea50e2c437e5f99e36a00bcfd830c55f932821d/flask-mwoauth-0.1.2.tar.gz" } ], "0.1.25": [ { "comment_text": "", "digests": { "md5": "faa457fd8e01f363d844605a902dba95", "sha256": "329e4ba9bcfd7143d41b92ef0621fb83f419d12715f6c8bde2f45239454350e4" }, "downloads": -1, "filename": "flask-mwoauth-0.1.25.tar.gz", "has_sig": false, "md5_digest": "faa457fd8e01f363d844605a902dba95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3232, "upload_time": "2014-01-11T14:06:26", "url": "https://files.pythonhosted.org/packages/59/1f/c49f67bc7b5d71013011fb0ea7d738c4df3397a6e1adc5a8bac7a2d838a5/flask-mwoauth-0.1.25.tar.gz" } ], "0.1.31": [ { "comment_text": "", "digests": { "md5": "634bc7ac8abc9c016e75c2584a297982", "sha256": "12ab6c3ad6da0a54cf391191cb89eacdacbbf1aefc452009e3638ec4a4839653" }, "downloads": -1, "filename": "flask-mwoauth-0.1.31.tar.gz", "has_sig": false, "md5_digest": "634bc7ac8abc9c016e75c2584a297982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3249, "upload_time": "2014-01-14T12:46:52", "url": "https://files.pythonhosted.org/packages/b2/2f/5f6b4b3aecafcaaf76dc0c359a232ab9b86e126a8310cf55a342ad734941/flask-mwoauth-0.1.31.tar.gz" } ], "0.1.34": [ { "comment_text": "", "digests": { "md5": "41eaae8a9c89e6b887cdf852c85b874c", "sha256": "081866478dc8742feb2865d039e2254e1850eb6d992235f4becba1a25cdf0d57" }, "downloads": -1, "filename": "flask-mwoauth-0.1.34.tar.gz", "has_sig": false, "md5_digest": "41eaae8a9c89e6b887cdf852c85b874c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3787, "upload_time": "2014-07-21T04:19:12", "url": "https://files.pythonhosted.org/packages/65/f6/44dd724f249d17aec5b73d84c47e2fbfe5849c353a0cee83cde412146da4/flask-mwoauth-0.1.34.tar.gz" } ], "0.1.35": [ { "comment_text": "", "digests": { "md5": "998d0c4ff0e5e520fc295016ebdf7bc6", "sha256": "eae0fab87cc32a39e81586a67578ee33434d5b5074710ac5fedc6ef5eb9cc424" }, "downloads": -1, "filename": "flask-mwoauth-0.1.35.tar.gz", "has_sig": false, "md5_digest": "998d0c4ff0e5e520fc295016ebdf7bc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5984, "upload_time": "2014-07-23T03:30:59", "url": "https://files.pythonhosted.org/packages/34/50/eeacb0b044b6e60e864cc41f2a4d2ac0f3a4d413e18f486c770d5363f08e/flask-mwoauth-0.1.35.tar.gz" } ], "0.1.37": [ { "comment_text": "", "digests": { "md5": "b7f8b421c777b9c306efbca5be4df575", "sha256": "ac7835b1cac35731d9a47fb0e2585a03ab9284860de9a4ccf231a17243554e8d" }, "downloads": -1, "filename": "flask-mwoauth-0.1.37.tar.gz", "has_sig": false, "md5_digest": "b7f8b421c777b9c306efbca5be4df575", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6111, "upload_time": "2015-03-21T16:52:48", "url": "https://files.pythonhosted.org/packages/90/16/67722e329e1f4627ddab71370623942d2291b9de6c50d9c8b44c23fdaea2/flask-mwoauth-0.1.37.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "44486134ed27f261d26b3f113f1bea6d", "sha256": "949ebfe4cb88d94c0aec5c0e46fc49706a4e0fbfe0ce69c88cb95aa7c438a245" }, "downloads": -1, "filename": "flask-mwoauth-0.1.5.tar.gz", "has_sig": false, "md5_digest": "44486134ed27f261d26b3f113f1bea6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2599, "upload_time": "2013-10-20T16:48:30", "url": "https://files.pythonhosted.org/packages/4e/2e/1895e43dded4b8e03361e4ea38691dbaf5389d36a2b3cc76124b86478f24/flask-mwoauth-0.1.5.tar.gz" } ], "0.2.46": [ { "comment_text": "", "digests": { "md5": "2294886dd591b5738398267c8c53ef7d", "sha256": "cc3f849bf5d133e6958490fb6e2659efcf113fb31d4d996a2d93a0eaffd1115a" }, "downloads": -1, "filename": "flask-mwoauth-0.2.46.tar.gz", "has_sig": false, "md5_digest": "2294886dd591b5738398267c8c53ef7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6661, "upload_time": "2015-07-25T19:02:26", "url": "https://files.pythonhosted.org/packages/e3/2a/f48eb37a8d3451a32caec59d749255548475a21a81aed0d021e4bb076fa7/flask-mwoauth-0.2.46.tar.gz" } ], "0.2.51": [ { "comment_text": "", "digests": { "md5": "2166ebd1149fc8fef43135cd1cdd6df0", "sha256": "eebcad97dea75870bb11d45ae5c18957ae1c4c6a53d3500e2a848cffd066a77f" }, "downloads": -1, "filename": "flask-mwoauth-0.2.51.tar.gz", "has_sig": false, "md5_digest": "2166ebd1149fc8fef43135cd1cdd6df0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6788, "upload_time": "2016-08-01T19:58:42", "url": "https://files.pythonhosted.org/packages/4a/de/8812cb48967b498e503461fe652dfe92094694ed8b5513a0b5850ae40bcf/flask-mwoauth-0.2.51.tar.gz" } ], "0.2.54": [ { "comment_text": "", "digests": { "md5": "05713c2264cbb96832f9657517f3c76d", "sha256": "14babea19e76ec564dd9fb379607ee15fd579440b5b6db1edc8f768b7be41277" }, "downloads": -1, "filename": "flask-mwoauth-0.2.54.tar.gz", "has_sig": false, "md5_digest": "05713c2264cbb96832f9657517f3c76d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7122, "upload_time": "2016-08-01T20:53:10", "url": "https://files.pythonhosted.org/packages/20/cd/058f7464cb2c4e859341f3dd7648cbcd4a23aa1f43f749677bed950c91c0/flask-mwoauth-0.2.54.tar.gz" } ], "0.3.61": [ { "comment_text": "", "digests": { "md5": "455fd415e6f0abb95e361acae05939d8", "sha256": "1fd3012bcc58a5abd211ccfcb11b8daa4c4ea45fd9b71e0ef1900f860d22cec9" }, "downloads": -1, "filename": "flask-mwoauth-0.3.61.tar.gz", "has_sig": false, "md5_digest": "455fd415e6f0abb95e361acae05939d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7530, "upload_time": "2017-02-11T20:35:21", "url": "https://files.pythonhosted.org/packages/39/33/d365793fe647ad43a3d8e968c3764e7096691884114044e8ac1d4874bb2d/flask-mwoauth-0.3.61.tar.gz" } ], "0.3.70": [ { "comment_text": "", "digests": { "md5": "1cfd8afc2388b4303f40ad9eb3f0221b", "sha256": "9ac2c802a2943798b8e72c13362adf1918f060f3deed3efd2c155e1ad680fccd" }, "downloads": -1, "filename": "flask-mwoauth-0.3.70.tar.gz", "has_sig": false, "md5_digest": "1cfd8afc2388b4303f40ad9eb3f0221b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7719, "upload_time": "2018-10-29T19:43:15", "url": "https://files.pythonhosted.org/packages/33/a1/6f9a71c16c1efc1ecb1435a828958779c80abcc5e4c7d58a991b1d5fca3f/flask-mwoauth-0.3.70.tar.gz" } ], "0.4.75": [ { "comment_text": "", "digests": { "md5": "296470ec50d74f011b9a21cf45bbdc5f", "sha256": "6df2e2448ea9251c61d4142da1aa2cd529e9ce22b440b577b1197912a8969be9" }, "downloads": -1, "filename": "flask-mwoauth-0.4.75.tar.gz", "has_sig": false, "md5_digest": "296470ec50d74f011b9a21cf45bbdc5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7903, "upload_time": "2019-07-27T20:39:46", "url": "https://files.pythonhosted.org/packages/b2/0b/4e4d875eb4c20b73ae9c744be53ff7f32b808d8c0871f1efbd4558deb986/flask-mwoauth-0.4.75.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "296470ec50d74f011b9a21cf45bbdc5f", "sha256": "6df2e2448ea9251c61d4142da1aa2cd529e9ce22b440b577b1197912a8969be9" }, "downloads": -1, "filename": "flask-mwoauth-0.4.75.tar.gz", "has_sig": false, "md5_digest": "296470ec50d74f011b9a21cf45bbdc5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7903, "upload_time": "2019-07-27T20:39:46", "url": "https://files.pythonhosted.org/packages/b2/0b/4e4d875eb4c20b73ae9c744be53ff7f32b808d8c0871f1efbd4558deb986/flask-mwoauth-0.4.75.tar.gz" } ] }