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

Provides grok specific autodoc directives for sphinx

Project Description

Introduction

horae.sphinx.grok is an extension for the Sphinx documentation generator. It provides two new autodoc directives autogrok and autogrokfunction. By using those directives instead of the stock autoclass and autofunction ones additional grok specific information is given about the class or function.

If the autogrok directive is as an example used on the following class definition:

class ExampleAdapter(grok.Adapter):
    """
    An adapter demonstrating the autogrok directive
    """
    grok.context(IAdaptee)
    grok.implements(ISomeFunctionality)
    grok.name('example')

The reStructuredText output of the docstring would look like this:

An adapter demonstrating the autogrok directive

:context:
    :class:`IAdaptee`
:implements:
    :class:`ISomeFunctionality`
:name:
    example

The autogrokfunction is doing the same for functions:

@grok.adapter(IAdaptee, name="example")
@grok.implementer(ISomeFunctionality)
def example_adapter_factory(context):
    """
    An adapter factory demonstrating the autogrokfunction directive
    """
    return ExampleAdapter(context)

Which would result in:

An adapter factory demonstrating the autogrokfunction directive

:context:
    :class:`IAdaptee`
:implements:
    :class:`ISomeFunctionality`
:name:
    example

Changelog

1.0a1 (2012-01-16)

  • Initial release
Release History

Release History

This version
History Node

1.0a1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
horae.sphinx.grok-1.0a1.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Jan 16, 2012

Supported By

WebFaction WebFaction Technical Writing 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 Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting