Skip to main content

A small Python code parser which allow to generate a basic documentation

Project description

Littledoc is a small lib which allow to extract your Python documentation in an easy way.

The following documentation of Littledoc had been generate executing script doc.py


littledoc

Small module which allow you to extract your docstring documentation in the format of your choice.

parse

def parse(working_path: str, module_name: str, show_private=False) -> dict

Parse your code and docstring then generate a dict with it.

Arguments

Name Type Description
module_name str The name of the module you want to generate dict of your documentation
show_private If True, parser will navigate through your private methode. At False by default.
working_path str The working directory to fetch your module

Return

dict : Dictionnary which contain metadata and doc.

write

def write(module: dict) -> str

Now, allow to generate a single page documentation in markdown using the only on Jinja template available. The dictionary should be generated by parser.

Arguments

Name Type Description
module dict The dict of your module generated by parser.

Return

str : A single page markdown representation of your documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

littledoc-0.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file littledoc-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: littledoc-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for littledoc-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20c3db265dc91f91d0a6e006d237f3bae03d1c0f3ad89c9d3aea5a2ceda8dcbb
MD5 429ece2ff8ffca3319285100793a8462
BLAKE2b-256 11a886a551775a49c4ab9002ecd48da9468d65900c8446e7f684b88419dfe5cb

See more details on using hashes here.

Supported by

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