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.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: littledoc-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76cb3e03147f5c2a7089a15f5f5090f3fa1ef0a1794ea6ca727294e29abd78c5
MD5 1c308d348875c2cf34a032781b5e04c8
BLAKE2b-256 9d7fe2d6c6ed94ce0f5ae664c200e7c766d60b43ba20575be2dc033bece7cc41

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