Swagger UI for Python web framework, such Tornado, Flask and Sanic.
Project description
swagger-ui-py
Swagger UI for Python web framework, such Tornado, Flask and Sanic.
Swagger UI
Swagger UI version is 3.19.3
. see https://github.com/swagger-api/swagger-ui.
Usage
-
Install
pip install swagger-ui-py
-
Code
# for Tornado from swagger_ui import tornado_api_doc tornado_api_doc(app, config_path='./conf/test.yaml', url_prefix='/api/doc', title='API doc') # for Sanic from swagger_ui import sanic_api_doc sanic_api_doc(app, config_path='./conf/test.yaml', url_prefix='/api/doc', title='API doc') # for Flask from swagger_ui import flask_api_doc flask_api_doc(app, config_path='./conf/test.yaml', url_prefix='/api/doc', title='API doc')
-
Edit
Swagger
config file (JSON or YAML)Please see https://swagger.io/resources/open-api/.
-
Access
http://<host>:<port>/api/doc
, open the url in your browser.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for swagger_ui_py-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cacabea5c7c286b723810365e78c911f0ae7e97fb20384ed649354bf558e32b4 |
|
MD5 | 09f73deb26ab3319901172efc1dee435 |
|
BLAKE2b-256 | a9f54bdf3481ab47f423e83aaa096f30106a0bc17511e8a54af4eacd2699d565 |
Close
Hashes for swagger_ui_py-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48c1f30ec39d3c83fac046cfee3245b3eebda1aed36e7658ebf4f0ceb6d21c88 |
|
MD5 | 56a24c93ba8dbfe29a3258e664ffe15d |
|
BLAKE2b-256 | beb4990defbb7073311ce1f84115237d4dd4b02d5f7f320a66cafd272805e875 |