Skip to content

Options

Options for the AMTLK package.

In general, these options are not intended for functional differences but more for any output generated by the package, such as rich or logging.

class AMLTKOptions #

Bases: TypedDict

The options available for AMTLK.

from amltk import options

print(options)
<module 'amltk.options' from '/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/amltk/options.py'>

rich_signatures: bool
attr
#

Whether to display full signatures in rich output.

Whether to use links in rich output.

The links to use in rich output.

The keys are the names of the packages, and the values are either the direct link to use or a callable that takes the fully qualified name of the object and returns the link to use.

def get_option(name, default=None) #

Get an option.

from amltk import options

print(options.get_option("rich_signatures"))
True
Source code in src/amltk/options.py
def get_option(name: str, default: T | None = None) -> Any | T | None:
    """Get an option.

    ```python exec="true" source="material-block" result="python"
    from amltk import options

    print(options.get_option("rich_signatures"))
    ```
    """
    return _amltk_options.get(name, default)