Skip to main content

Dependency-free, lightweight docstring parser

Project description

Thoth doc: Dependency-free, lightweight docstring parser

Thoth image

Installation

pip install thoth-doc

Usage

# code.py

def foo(bar: int, baz: str = "qux") -> None:
    """This is a docstring"""
    pass


class Foo:
    """This is a class docstring"""

    def bar(self, bar: int, baz: str = "qux") -> None:
        """This is a method docstring"""
        pass
from thoth_doc import get_docstring

docstring = get_docstring("code.py", "foo")  # find docstring of foo in code.py
print(docstring)  # "This is a docstring"

docstring = get_docstring("code.py", "Foo")  # find docstring of Foo class in code.py
docstring = get_docstring("code.py", "Foo.bar")  # find docstring of Foo.bar method in code.py

License

MIT License

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

thoth_doc-0.0.91.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

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

thoth_doc-0.0.91-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file thoth_doc-0.0.91.tar.gz.

File metadata

  • Download URL: thoth_doc-0.0.91.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for thoth_doc-0.0.91.tar.gz
Algorithm Hash digest
SHA256 5e51bba171e3b2b2434ea24a99033f17837eb50e4af1533349f105e5a98ebdb6
MD5 d141a20ab55f489c62f543044c38e2e1
BLAKE2b-256 dd328708b3c9d1e05f9804a26cb29d1b34e709952279ec77631814e86f25205c

See more details on using hashes here.

File details

Details for the file thoth_doc-0.0.91-py3-none-any.whl.

File metadata

  • Download URL: thoth_doc-0.0.91-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for thoth_doc-0.0.91-py3-none-any.whl
Algorithm Hash digest
SHA256 50e9b8a9fe2108029e172b5ba86c8dd7eb2b68ebf8c270cb4c89be0d41f478fe
MD5 a5671a8bc5bd1d4c06350d30865f6193
BLAKE2b-256 bba4a0f2ad8603aea773c5de6842224bc961f89cb9bcc165ca70be6d73c89499

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