googleapis/protoc-docs-plugin

Name: protoc-docs-plugin

Owner: Google APIs

Description: A protoc plugin that appends docstrings to Message subclasses on the default Python pb2 generated output.

Created: 2017-06-08 14:38:04.0

Updated: 2018-05-23 19:30:21.0

Pushed: 2018-05-17 18:07:14.0

Homepage:

Size: 66

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

protoc-docs-plugin

This is a protoc plugin intended to augment protoc's default Python output with docstrings. It has been loosely designed to be able to support docstrings for other langauges also, but this is contingent upon the availability of appropriate insertion points in those languages.

Installation & Dependencies

This package depends on the current version of protobuf and pypandoc from PyPI.

p install protoc-docs-plugin

Additionally, this package also depends on the pandoc OS package, which you will need to install from your OS package manager.

While it will run standalone as well, it only ever actually makes sense to invoke it from protoc.

Usage

Add --pydocstring_out to the same command to protoc that has a previous --python_out directive.

Example:

otoc foo.proto --python_out=. --pydocstring_out=.

Order does matter here; protoc must write the plain Python output first before it can augment it with the output from this plugin.

More Information

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.