metaman package

metaman package

metadata manager (METAMAN)… Makes use of Python’s dynamic nature to inspect a program’s internals.

class Inspector(*, up=0)[source]

Bases: object

Helper class for python introspection (e.g. What line number is this?)

Parameters

up (int) –

exception MetamanDeprecationWarning[source]

Bases: Warning

DepreciationWarning that doesn’t get ignored by default.

cname(obj)[source]

Helper function for getting an object’s class name as a string.

Parameters

obj (object) –

Return type

str

deprecated(func, wmsg)[source]

Used to deprecate @func after renaming it or moving it to a different module/package.

Parameters
  • func (Callable) –

  • wmsg (str) –

Return type

Callable

register_function_factory(mut_registry)[source]

Factory for decorators used to register a function.

We append all decorated functions to the mut_registry list.

Parameters

mut_registry (MutableSequence[TypeVar(T)]) –

Return type

Callable[[TypeVar(T)], TypeVar(T)]

scriptname(*, up=0)[source]

Returns the name of the current script / module.

Parameters

up (int) – How far should we crawl up the stack?

Return type

str