Tool for automated or semi-automated generate a OpenAPI Specification (aka Swagger Specification) for Web APIs written with Python and famous frameworks, such as:
- Django REST Framework (DRF>=3; Django>=1.8)
- Falcon (falcon>=0.3)
- flask
- bottle
- and ever you own framework
Supported only v2 OpenAPI Specification
This tool is written as part of our Documentation Toolkit which we use in our job daily. The main idea of toolkit is to make a process of creating and updating documentation able to be automated
Other parts of our toolkit is:
Install from PyPI with
$ pip install py2swagger
usage: py2swagger [-h] [-c CONFIG] [-r ROOT] [-o OUTPUT]
{falcon,drf,simple} ...
Swagger schema builder
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Path to config file
-r ROOT, --root ROOT Path to project root. Default is current directory or
configuration file location
-o OUTPUT, --output OUTPUT
Output file (Default stdout)
plugins:
{falcon,drf,simple}
falcon
drf
simple Plugin for all applications
python setup.py test