Artificial Intelligence-based code documentation assistant

Photo by Pakata Goh on Unsplash

Artificial Intelligence is extensively used for developing models to help developers write better source code. Various AI models are used to accelerate the work of developers, such as code autocompletion, autosuggestions, unit test assistance, bug detection, code summarization, etc.

Documentation of code is essential while delivering the project. For large code snippets having thousands of lines of code, it's very difficult to understand the code functionality for the next set of developers, testers, or clients, and hence code documentation of comments is essential. Most of the developers find it difficult or forget to write documentation or comments.

It is a big challenge for the developers to cope up with writing code, testing the code, and keeping up with its documentation. Docly comes to the rescue, as it automatically generates documentation for python code using state-of-the-art natural language processing.

What is Docly?


Docly is a python package by Codist.AI that can automatically generate documentation for your python code. It extensively used natural language processing to go through all the functions in the code snippet and generate docstring or comments automatically and can also update any missing or outdated docstring.

Docly is provided in the command-line interface and can review or complete the documentation in one-line command in few seconds.


Pypl installation for the required packages.

pip install -U PyYAML
pip install docly


To generate documentation of a given python code snippet, use a single line of the command-line statement:

docly-gen <>

After the docly engine is loaded and the docstring is generated, it will seek permission to show the suggestions.

Taking input as ‘y’, it generates all the function names in the code snippets along with the generated docstring for each function.