unitelabs.jsondocs.cli
Attributes
- Name
app
- Type
- Value
= typer.Typer()
- Description
Functions
@app.command(help='Write a JSON file of the documentation for the given `package_name`.\n Requires the package to be available on `sys.path`, i.e. installed in local environment.\n Current default outpath is `package-name.json`.')
jdoc(- package_name : typing_extensions.Annotated[str, []],
- outpath : typing_extensions.Annotated[typing.Optional[pathlib.Path], []],
- package : typing_extensions.Annotated[typing.Optional[str], []]
Parameters
- Name
package_name
- Type
- typing_extensions.Annotated[str, []]
- Default
- Description
- Name
outpath
- Type
- typing_extensions.Annotated[typing.Optional[pathlib.Path], []]
- Default
- = None
- Description
- Name
package
- Type
- typing_extensions.Annotated[typing.Optional[str], []]
- Default
- = None
- Description
write_package_json(
- package_name : str,
- outpath : typing.Optional[pathlib.Path],
- package : typing.Optional[str]
Write a JSON file of the documentation for the given `package_name`. Requires the package to be available on `sys.path`, i.e. installed in local environment.
Parameters
- Name
package_name
- Type
- str
- Default
- Description
The name of the package or the dot-separated import path (also the case for namespaced packages), to the module to extract documentation from, or a relative path to a package/module, which requires `package` to also be set.
- Name
outpath
- Type
- typing.Optional[pathlib.Path]
- Default
- = None
- Description
The desired path of the JSON output file, defaults to directory in which this is run, using the distribution name.
- Name
package
- Type
- typing.Optional[str]
- Default
- = None
- Description
The name of the package in the form of `package_name`, for use with relative paths.