Dependency-free, lightweight docstring parser
Project description
Thoth doc: Dependency-free, lightweight docstring parser
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
Project details
Release history Release notifications | RSS feed
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.6.tar.gz
(34.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thoth_doc-0.0.6.tar.gz.
File metadata
- Download URL: thoth_doc-0.0.6.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c96f32fab9cde6e4aeadda4b972219c63429403d318d67d0f1fa4c5f208a4a23
|
|
| MD5 |
7e60f50bd24a90f6da6a0273a3fccd9a
|
|
| BLAKE2b-256 |
e10d15920b536b79359af3c8bc16025fbc42b1d9e8ec9c2eb431e7cd91828079
|
File details
Details for the file thoth_doc-0.0.6-py3-none-any.whl.
File metadata
- Download URL: thoth_doc-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bdc81fe1fdee24d8fac613789b8c6e80404ce5ff0c00e2fda6da73755e1b4ba
|
|
| MD5 |
0d945e689d041b94924c8484ad3a434d
|
|
| BLAKE2b-256 |
a65bb95bb0977442b33de62bccca5fdafe4f8518d84c6745f6da20cdc288a411
|