Skip to content

Commit ae3f4b5

Browse files
committed
update readme
1 parent 327cc21 commit ae3f4b5

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Swagger Py Codegen is a Python web framework generator, which can help you gener
1111
* [Flask](http://flask.pocoo.org/) (Python)
1212
* [Tornado](http://www.tornadoweb.org/en/stable/) (Python)
1313
* [Falcon](https://falconframework.org/) (Python)
14+
* [Sanic](https://github.com/channelcat/sanic) (Python)
1415

1516

1617
**Alpha version for now, it may not handle all validation properly. If you found a bug, feel free to contact us.**
@@ -122,6 +123,31 @@ Generate example-app from [api.yml](https://github.com/guokr/swagger-py-codegen/
122123
| |__ validators.py
123124
|__ requirements.txt
124125

126+
127+
#### Sanic Example
128+
129+
$ swagger_py_codegen -s api.yml example-app -p demo -tlp=sanic
130+
$ tree (sanic-demo)
131+
.
132+
|__ api.yml
133+
|__ example-app
134+
|__ demo
135+
| |__ __init__.py
136+
| |__ v1
137+
| |__ api
138+
| | |__ __init__.py
139+
| | |__ oauth_auth_approach_approach.py
140+
| | |__ oauth_auth_approach.py
141+
| | |__ users_token.py
142+
| | |__ users_current.py
143+
| | |__ users.py
144+
| |__ __init__.py
145+
| |__ routes.py
146+
| |__ schemas.py
147+
| |__ validators.py
148+
|__ requirements.txt
149+
150+
125151
#### Run Web Server
126152

127153
Install example-app requirements:
@@ -146,7 +172,7 @@ Then you can visit [http://127.0.0.1:5000/static/swagger-ui/index.html](http://1
146172
|component|compatibility|
147173
|-----|-----|
148174
|OpenAPI Spec|2.0|
149-
|Python|2.\*, 3.\*|
175+
|Python|2.\*, 3.\*(Sanic only 3.\*)|
150176

151177

152178
## Authors

0 commit comments

Comments
 (0)