This library provides python Flask utilities and static assets for rendering Swagger UI
Project description
This library provides python Flask utilities and static assets for rendering Swagger UI.
# Example
```python
from flask import Flask, jsonify
from flask_swaggerui import render_swaggerui, build_static_blueprint
app = Flask(__name__)
@app.route('/')
def root():
return render_swaggerui(swagger_spec_path="/spec")
@app.route('/spec')
def spec():
return jsonify({"some swagger": "spec stuff"})
# Adds static assets for swagger-ui to path
app.register_blueprint(build_static_blueprint("swaggerui", __name__))
if __name__ == "__main__":
app.run(port=8080, debug=True)
```
# Example
```python
from flask import Flask, jsonify
from flask_swaggerui import render_swaggerui, build_static_blueprint
app = Flask(__name__)
@app.route('/')
def root():
return render_swaggerui(swagger_spec_path="/spec")
@app.route('/spec')
def spec():
return jsonify({"some swagger": "spec stuff"})
# Adds static assets for swagger-ui to path
app.register_blueprint(build_static_blueprint("swaggerui", __name__))
if __name__ == "__main__":
app.run(port=8080, debug=True)
```
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 Distribution
flask-swaggerui-0.0.1.tar.gz
(722.6 kB
view details)
Built Distribution
File details
Details for the file flask-swaggerui-0.0.1.tar.gz
.
File metadata
- Download URL: flask-swaggerui-0.0.1.tar.gz
- Upload date:
- Size: 722.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebaa74017a61a6099425f5f9d59a6f71ead4e8ba0a876bf50901e99323ea0087 |
|
MD5 | f08f0ebafe49e022381ac0efae2ee499 |
|
BLAKE2b-256 | f4b4b6edde9d66c5bbf60ef219b9194d15b457a3c9ecdac5efaa89093e8d5468 |
File details
Details for the file flask_swaggerui-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: flask_swaggerui-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 740.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5478caa347389156aca782f91281dc03e4fd0f3701d0afa9cedf0c35b77f185 |
|
MD5 | 87839c5ce253b6898cbc8e0fc151c205 |
|
BLAKE2b-256 | 3c06af72378c8c05f37c4890687956818d382a05aa9ecf764b4d4c30edd1ec56 |