Skip to main content

Adds example directive for sphinx-contrib httpdomain

Project description

sphinxcontrib-httpexample

GitHub Actions Coverage PyPI package Documentation

sphinxcontrib-httpexample is a Sphinx domain extension for describing RESTful HTTP APIs in detail. It enhances sphinxcontrib-httpdomain with a simple call example directive. The directive provided by this extension generates RESTful HTTP API call examples for different HTTP clients from a single HTTP request example.

The audience for this extension are developers and technical writers documenting their RESTful HTTP APIs. This extension was originally developed for documenting plone.restapi.

Features

Examples

This extension has been used in documentation for the following projects and probably other similar projects as well.

Documentation

Full documentation for end users can be found in the docs folder. It's also available online at https://sphinxcontrib-httpexample.readthedocs.io/en/latest/.

Installation

Add sphinxcontrib-httpexample and sphincontrib-httpdomain to your project requirements.

Then configure your Sphinx configuration file conf.py with sphinxcontrib.httpdomain and sphinxcontrib.httpexample as follows.

extensions = [
    "sphinxcontrib.httpdomain",
    "sphinxcontrib.httpexample",
]

Contribute

To contribute to sphinxcontrib-httpexample, first set up your environment.

Set up development environment

Install uv. Carefully read the console output for further instruction.

curl -LsSf https://astral.sh/uv/install.sh | sh

Initialize a Python virtual environment.

uv venv

Install sphinxcontrib-httpexample.

uv sync

Build documentation

Rebuild Sphinx documentation on changes, with live reload in the browser.

make livehtml

To stop the preview, type CTRL-C.

Run tests

make test

License

The project is licensed under the GPLv2.

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

sphinxcontrib_httpexample-2.0.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinxcontrib_httpexample-2.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file sphinxcontrib_httpexample-2.0.tar.gz.

File metadata

  • Download URL: sphinxcontrib_httpexample-2.0.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.0

File hashes

Hashes for sphinxcontrib_httpexample-2.0.tar.gz
Algorithm Hash digest
SHA256 881881e0125e0f75c15e46564a82252dd8a68c499348d2d9e42cd52c213a58ad
MD5 3d94abfede7dde549580d6d3d6f43abd
BLAKE2b-256 4297a2d11c63399e777f3013c508b1c7147cea86f10ebfa13f22b0f27e104c88

See more details on using hashes here.

File details

Details for the file sphinxcontrib_httpexample-2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxcontrib_httpexample-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e73ffc3e137816cb08947acc6210eaf0ea6a21400e0bc51e142a2a9b8ceecdc
MD5 7a49919670eed1dae9fa88309ebc1143
BLAKE2b-256 d4d6decba4e0db46c23fe098e82c821c714391b436a30fc3df18dea253bf9653

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page