serve swagger api docs locally fast
Project description
provides a simple mechanism to locally serve your swagger.io spec files
Installation
pip install serve-swagger
Useage
you can pass in a local file
serve-swagger my-spec.yaml
and now you can visit it at http://localhost:5000
if you want to share your site on your local network you will need to specify the host
serve-swagger --host=0.0.0.0 c:\users\joran\demo\my_spec.yaml
now anyone can go to your network ip at http://10.10.X.Y:5000 and view your API docs
you can also specify the portnumber
serve-swagger -p 8080 api-spec.json
this would expose the server on port 8080 (http://localhost:8080)
usage: serve-swagger [-h] [-p [PORT]] [-s [HOST]] [-v] [swagger_spec_file]
positional arguments:
swagger_spec_file a local swagger spec file, or a url that serves a
swagger spec file
optional arguments:
-h, --help show this help message and exit
-p [PORT], --port [PORT]
the port to serve on
-s [HOST], --host [HOST]
the host interface to serve on
-v, --debug run flask in debug mode
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
serve-swagger-1.3.tar.gz
(3.1 kB
view details)
File details
Details for the file serve-swagger-1.3.tar.gz
.
File metadata
- Download URL: serve-swagger-1.3.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e72948a7e8bf878390b531efbfb448ac31d3646fd48bac15b177f3d22c9cd2a4 |
|
MD5 | a55ec0c70d7ab6052aa422e96e9ba927 |
|
BLAKE2b-256 | 97dd3111ed4810331118bfc9a61226c66d91f61650113c3a9fdca80dbd279068 |