Flask-WX-OAuth
官方文档
安装
pip install Flask-WX-OAuth
使用方式
flask扩展的使用方式:
from flask_wx_oauth import WXOAuth
wx_oauth = WXOAuth()
wx_oauth.init_app(app)
也可以每次初始化后使用:
from flask_wx_oauth import WXOAuth
wx_oauth = WXOAuth(appid='YOUR APPID', secret='YOUR SECRET')
在view中调用
next = request.args.get('next', '/')
redirect_uri = url_for('.authorized', next=next, _external=True)
params = dict(
redirect_uri=redirect_uri,
scope='snsapi_base',
)
return redirect(wx_oauth.get_authorize_url(**params))
运行示例代码
docker build -t flask-wx-oauth .
docker run -v $(pwd):/app -p 5000:5000 flask-wx-oauth
Metadata
Release files for Flask-WX-OAuth 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-WX-OAuth-0.2.3.tar.gz | 4.0 kB | Without provenance | Details for Flask-WX-OAuth-0.2.3.tar.gz |
Release files / Flask-WX-OAuth-0.2.3.tar.gz
| Download URL | Flask-WX-OAuth-0.2.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
130b2bf4b95b9e9bc4699cd55915549df40ce932fc357c5d77069fb8510806c3
|
|
BLAKE2b-256 checksum How to use checksums |
3620f3459c1da19ee8c0eab6e0c7253964b0f45d0ccbe2c2d5fd27e639a294cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for Flask-WX-OAuth 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.