Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Converter from Swagger to Sphinx HTTP domain.

Project Description

Swagger is an open specification for documenting REST APIs in JSON or YAML. Imperfect as it is, it’s de facto a standard for many API developers.

This extension lets you render your swagger.json file as a Sphinx document. It uses HTTP domain directives for paths and a glossary for definitions.


This extension was created for a particular project and thus is only guaranteed to work with this particular project! It is very much likely you’ll have to modify swagger-api.rst for your project.


  1. Install the extension:

    $ pip install sphinxcontrib-swagger2sphinx
  2. Copy the content of swagger-api.rst to the file where you want your Swagger file rendered.

  3. Add the extension to your

    extensions = [
  4. Specify the path to your Swagger file in It can be a local path or a URL:

    swagger2sphinx_swagger_location = "swagger.json"
    # swagger2sphinx_swagger_location = ""


Thanks to Eric Holscher for writing an excellent blog post about extending Sphinx with Jinja2 templating.

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.7 kB) Copy SHA256 Hash SHA256
Wheel 3.5 Oct 7, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting