Skip to main content

Set code files free from unwieldy documentation!

Project description

First, what Doc-Gen is not: it does not build documentation nor does it serve any role in what you do after you write the documentation. In fact, it does what its name says: it helps you write documentation.

When I code, I often find it hard to write docstrings; these bits of inline documentation make navigating around the file a hassle. To move all docstrings out of file yet still have them remain recognizable to other libraries, that is the purpose of this library.

How to use this library

This library has a shell script, doc, and a decorator, doc. Pretty easy to remember. To use this library, you have to decorate the functions which you want with doc, like so:

# source.py

@doc
def function(x, y):
     return 2 * x + y

Then, in the terminal, you should type doc source.py, and you should see a prompt asking you for a docstring for function.

After that, drop into the shell and check out the docstring of function:

>>> import source
>>> source.function.__doc__
'<whatever you wrote>'

Sweet, isn’t it?

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

doc-gen-0.0.1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

doc_gen-0.0.1-py2.py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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