Skip to main content

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

Metadata

Release files for serve-swagger 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for serve-swagger 1.3
File Size Uploaded
serve-swagger-1.3.tar.gz 3.1 kB Details

Release files / serve-swagger-1.3.tar.gz

Download URL serve-swagger-1.3.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e72948a7e8bf878390b531efbfb448ac31d3646fd48bac15b177f3d22c9cd2a4
BLAKE2b-256 checksum
How to use checksums
97dd3111ed4810331118bfc9a61226c66d91f61650113c3a9fdca80dbd279068
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page