File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff 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
127153Install 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
You can’t perform that action at this time.
0 commit comments