Skip to main content

PyPI - Downloads PyPI PyPI - Wheel PyPI - License

PDTJ - (Python Docstring To Json)

Introduction

This project was created to solve a personal need for a flexible and simple tool to retrieve all Python docstrings and convert them into a JSON format. The tool's design provides flexibility to customize the parsing and documentation process, making it easy to navigate through the codebase's structure and documentation.

This project aims to provide a powerful tool for parsing and documenting Python code within a directory. The tool works by recursively traversing a directory and identifying all Python files contained within it. It then extracts the docstrings of these files, organizing them into a dictionary format that captures the structure and documentation of the entire codebase. This dictionary is then written to a JSON file, making it easy to view and access the information it contains. Whether you're a software developer or a codebase maintainer, this tool can help you gain a deeper understanding of your Python code and streamline the documentation process.

Moreover, this tool aims to simplify the process of generating a documentation webpage by using the JSON file. It provides a clear overview of the codebase's structure and documentation, allowing users to quickly navigate through the code and understand its functionality. The project is designed to be flexible and customizable, enabling users to tailor the parsing and documentation process to their specific needs. With this tool, you can easily generate comprehensive documentation for your Python codebase and share it with others.

How to Use

Installation

To install the tool, run the following command:

pip install pdtj

Next, create a .pdtj.yaml file in the root directory of your project and specify the following information:

name: <project name> # replace <project name> with your project's name
shelve: <shelve name> # choose any name you like for <shelve name>
sub-project: <sub-project name> # choose any name you like for <sub-project name>

Generating the Documentation

Once you have installed the tool and configured the .pdtj.yaml file, you can generate the documentation by running the following command:

pdtj

If everything is set up correctly, the tool will traverse your project directory, extract the docstrings from all Python files, and create a JSON file containing the documentation. The resulting file can be used to generate a documentation webpage or for any other purpose.

Features missing

  • Log
  • Unit tests

License

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

Metadata

Release files for pdtj 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdtj 0.3.5
File Size Uploaded
pdtj-0.3.5.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdtj 0.3.5
File Interpreter ABI Platform
pdtj-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / pdtj-0.3.5.tar.gz

Download URL pdtj-0.3.5.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6994c36f22754b866f8aab045ac4bdc6ee4f7a8c8ce83e19aca4a4d322ef1234
BLAKE2b-256 checksum
How to use checksums
fbe1818b0d3e2b854531936a572d16dec62339daf95ffbe3cce2e3b3a024c8c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / pdtj-0.3.5-py3-none-any.whl

Download URL pdtj-0.3.5-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57a347e3b4dfb5784c6f56b4a0aa5c5c19fcd063f0585325ff466e031a52be9f
BLAKE2b-256 checksum
How to use checksums
92e089221f2da1e09edc2cb1b562e9a94a59b16670b912b793c25b89c58ff436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page