Skip to content

kiara

Attributes

builtins = __import__('__builtin__') module-attribute

KIARA_METADATA = {'authors': [{'name': __author__, 'email': __email__}], 'description': 'Kiara Python package', 'references': {'source_repo': {'desc': 'The kiara project git repository.', 'url': 'https://github.com/DHARPA-Project/kiara'}, 'documentation': {'desc': 'The url for kiara documentation.', 'url': 'https://dharpa.org/kiara_documentation/'}}, 'tags': [], 'labels': {'package': 'kiara'}} module-attribute

find_model_classes: KiaraEntryPointItem = (find_kiara_model_classes_under, 'kiara.models') module-attribute

find_model_classes_api: KiaraEntryPointItem = (find_kiara_model_classes_under, 'kiara.interfaces.python_api.models') module-attribute

find_renderer_classes: KiaraEntryPointItem = (find_kiara_renderers_under, 'kiara.renderers.included_renderers') module-attribute

Functions

dbg(*objects: typing.Any, sep: str = ' ', end: str = '\n', file: typing.Union[typing.IO[str], None] = None, flush: bool = False)

Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/__init__.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def dbg(
    *objects: typing.Any,
    sep: str = " ",
    end: str = "\n",
    file: typing.Union[typing.IO[str], None] = None,
    flush: bool = False,
):

    for obj in objects:
        try:
            rich_print(obj, sep=sep, end=end, file=file, flush=flush)
        except Exception:
            rich_print(
                f"[green]{obj}[/green]", sep=sep, end=end, file=file, flush=flush
            )

DBG(*objects: typing.Any, sep: str = ' ', end: str = '\n', file: typing.Union[typing.IO[str], None] = None, flush: bool = False)

Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/__init__.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
def DBG(
    *objects: typing.Any,
    sep: str = " ",
    end: str = "\n",
    file: typing.Union[typing.IO[str], None] = None,
    flush: bool = False,
):

    objs = (
        ["[green]----------------------------------------------[/green]"]  # noqa
        + list(objects)
        + ["[green]----------------------------------------------[/green]"]
    )
    dbg(*objs, sep=sep, end=end, file=file, flush=flush)

get_version() -> str

Return the current version of Kiara.

Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/__init__.py
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
def get_version() -> str:
    """Return the current version of *Kiara*."""
    from pkg_resources import DistributionNotFound, get_distribution

    try:
        # Change here if project is renamed and does not equal the package name
        dist_name = __name__
        __version__ = get_distribution(dist_name).version
    except DistributionNotFound:

        try:
            version_file = os.path.join(os.path.dirname(__file__), "version.txt")

            if os.path.exists(version_file):
                with open(version_file, encoding="utf-8") as vf:
                    __version__ = vf.read()
            else:
                __version__ = "unknown"

        except (Exception):
            __version__ = "unknown"

        if __version__ is None:
            __version__ = "unknown"

    return __version__