This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Description

Sphinx plugin to add an HTTP domain, allowing the documentation of RESTful HTTP methods.

This is very rudimentary and experimental code at the moment.

HTTP methods

You can document simple methods, wrap any arguments in the path with curly-braces:

.. http:method:: GET /api/foo/bar/{id}/{slug}

   :arg id: An id
   :arg slug: A slug

   Retrieve list of foobars matching given id.

Query string parameters are also supported, both mandatory and optional:

.. http:method:: GET /api/foo/bar/?id&slug

   :param id: An id
   :optparam slug: A slug

   Search for a list of foobars matching given id.

As well, you can provide types for parameters and arguments:

.. http:method:: GET /api/foo/bar/{id}/?slug

   :arg integer id: An id
   :optparam string slug: A slug

   Search for a list of foobars matching given id.

Fragments are also supported:

.. http:method:: GET /#!/username

   :fragment username: A username

   Renders a user's profile page.

Plus, you can document the responses with their response codes:

.. http:method:: POST /api/foo/bar/

   :param string slug: A slug
   :response 201: A foobar was created successfully.
   :response 400:

   Create a foobar.

To refer to an HTTP method, use :http:method::

.. http:method:: GET /api/
   :label-name: get-root
   :title: API root

The :http:method:`get-root` contains all of the API.

HTTP responses

Documenting responses is also simple:

.. http:response:: Foobar object

   A foobar object looks like this::

   .. source-code:: js
      {
         'slug': SLUG
      }

   :data string SLUG: A slug
   :format: JSON

To refer to an HTTP response, use :http:response::

.. http:response:: Foobar object

A :http:response:`foobar-object` is returned when you foo the bar.

Installation

Run pip install sphinx-http-domain.

Then, add sphinx_http_domain to your conf.py:

extensions = ['sphinx_http_domain']

Development

For contributions, please fork this project on GitHub!

Author

David Zentgraf (https://github.com/deceze)

Contributors

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sphinx-http-domain-0.2.tar.gz (9.6 kB) Copy SHA256 Checksum SHA256 Source Mar 12, 2011

Supported By

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