Swagger API Documentation builder for tornado server
Project description
tornado-swagger
PyPI | Anaconda |
---|---|
Linux | Windows |
---|---|
tornado-swagger: Swagger API Documentation builder for tornado server. Inspired by aiohttp-swagger package (based on this package sources).
Documentation | https://github.com/mrk-andreev/tornado-swagger/wiki |
---|---|
Code | https://github.com/mrk-andreev/tornado-swagger |
Issues | https://github.com/mrk-andreev/tornado-swagger/issues |
Python version | Python 3.5 and above |
Swagger Language Specification | https://swagger.io/specification/v2/ |
Installation
pip install -U tornado-swagger
conda install -c mrk.andreev tornado-swagger
What's tornado-swagger
tornado-swagger is a plugin for tornado server that allow to document APIs using Swagger show the Swagger-ui console (default url /api/doc).
class PostsDetailsHandler(tornado.web.RequestHandler):
def get(self, posts_id):
"""
---
tags:
- Posts
summary: Get posts details
description: posts full version
produces:
- application/json
parameters:
- name: posts_id
in: path
description: ID of post to return
required: true
type: string
responses:
200:
description: list of posts
schema:
$ref: '#/definitions/PostModel'
"""
What's new?
Version 1.2.1
- Support wrapped methods
Version 1.2.0
- Replace local js/css to cdn
- Remove static files serving
Version 1.1.0
- Swagger model definition
- Parameters filling in route path
- Schema definition
export_swagger(routes)
as public function- Update frontend
Version 1.0.0
- First version released
License
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
tornado-swagger-1.2.1.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for tornado_swagger-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f0c52ac488591a2f3f7cefb5b4954290e42d5e51678795ab35d99cedf8c136a |
|
MD5 | 31fd69f246220399e7e8d88314ca92b9 |
|
BLAKE2b-256 | 96c0b9a60057e424e1b6a61fa748c992e7714c06f12725dc5592dfa4fa435b9d |