Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Procedure to check for valid Sphinx ReST docstrings

Project description

PyPI Release Travis CI status Coverage status Documentation status MIT license

docstringtest is a small package for regression testing of docstrings in Python code. It checks that all appropriate methods and functions are using ReST docstrings with parameter information so that nice documentation can be generated. This format looks like:

def example_function(varA,varB):
   This function does nothing

   :param varA: The first variable
   :param varB: The second variable
   :type varA: The type of the first variable
   :type varB: The type of the second variable

It makes it easy to check that the docstrings match with the current parameters so that documentation doesn’t become out-of-step with the code.

If you wanted to add docstringtest to a standard test algorithm, it would simply be something like this

import mymodule
import docstringtest

def test_docstringtest():


You can install “docstringtest” via pip from PyPI:

$ pip install docstringtest


Contributions are very welcome.


Distributed under the terms of the MIT license, “docstringtest” is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

Project details

Download files

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

Files for docstringtest, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size docstringtest-0.3.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page