- `class Color(Enum)`
A enum for selecting colors
Members: RED, BLUE, GREEN
- `get_color(self)`
Color method for testing
- `@property get_name`
name property for testing
Here is a preview of the fastcore library, for instance:
_md = generate_markdown('fastcore', False)_lns = _md.splitlines()print('\n'.join([x for x in _lns][:20]))
# fastcore Module Documentation
## fastcore.aio
> Bridging async and sync code: `run_sync`, `iter_sync`, `ctx_sync`, `maybe_await`, and `then`
>
> Docs: https://fastcore.fast.ai/aio.html.md
- `def run_sync(coro)`
Run coroutine `coro` to completion from sync code and return its result
- `def iter_sync(agen)`
Iterate async generator `agen` from sync code
- `@contextmanager def ctx_sync(acm)`
Use async context manager `acm` in a plain `with` block
- `def maybe_await(o)`
Await `o` if needed, and return it
Write markdown to file
We can generate our list of symbols as a markdown file like so:
def pysym2md( package_name:str, # Name of the Python package include_no_docstring:store_true=False, # Include symbols without docstrings? verbose:store_true=False, # Turn on verbose logging? output_file:str='filelist.md', # The output file):
Generate a list of symbols corresponding to a python package in a markdown format.