Skip to content

A tool for extracting and converting Google-style docstrings to plain-text, Markdown, and JSON

License

Notifications You must be signed in to change notification settings

ooreilly/mydocstring

Repository files navigation

MyDocstring

MyDocstring is a small Python package that allows you to extract and parse docstrings. It is suited for building your own documentation system. Docstrings can be displayed as either plain-text, Markdown, or JSON data.

Getting Started

If you are interested in building a documentation solution for your own project, a good place to start is this tutorial. This tutorial will teach you how to extract and parse docstrings.

If you are after a complete documentation solution, then see the showcase section that features solutions built on MyDocstring.

The project also comes with a command line tool that serves as an example of what you can build with the package. See here for learning how to use the command line tool and to see some example output.

Installation

The package is available on the Python packaging index PyPi and can be installed via pip as follows.

$ pip install mydocstring

Dependencies

This project uses:

  • docopt for the command line interface application.
  • mako for producing markdown templates.
  • pytest for testing.

Issues

If you are having problems extracting your docstrings, or parts of their content end up missing, then please make sure that your are only using spaces (no tabs). Four spaces should be used for each level of indentation. Also, make sure that you conform to the Google style guide when writing your docstrings.

Otherwise, please submit a new issue using the issue tracker and explain the problem.

Contributing

Contributions are more than welcome. Please reach out via the issue tracker to discuss and also see here for some guidelines.

Showcase

If you end up using this tool in your project in one way or another. I would love to hear about it and showcase it here. Please go ahead and make a pull request.

  • NetKet is an open-source project for machine learning and many-body quantum systems. It uses mydocstring for generating reference documentation from pybind11 docstrings. See here for the source.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

A tool for extracting and converting Google-style docstrings to plain-text, Markdown, and JSON

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published