mellea.stdlib.mify
mellea.stdlib.mify.mify(query_type: type = Query, transform_type: type = Transform, fields_include: set[str] | None = None, fields_exclude: set[str] | None = None, funcs_include: set[str] | None = None, funcs_exclude: set[str] | None = None, template: str | None = None, template_order: str | list[str] | None = None, parsing_func: Callable[[str], T] | None = None, stringify_func: Callable[[T], str] | None = None)
mellea.stdlib.mify.mify(obj: T, query_type: type = Query, transform_type: type = Transform, fields_include: set[str] | None = None, fields_exclude: set[str] | None = None, funcs_include: set[str] | None = None, funcs_exclude: set[str] | None = None, template: str | None = None, template_order: str | list[str] | None = None, parsing_func: Callable[[str], T] | None = None, stringify_func: Callable[[T], str] | None = None)
mellea.stdlib.mify.mify(*args, **kwargs)
obj
: either a class or an instance of the classfields_include
: fields of the object to include in its representation to modelsfields_exclude
: fields of the object to exclude from its representation to modelsfuncs_include
: functions of the object to include in its representation to modelsfuncs_exclude
: functions of the object to exclude from its representation to modelsquery_type
: a specific query component type to use when querying a modeltransform_type
: a specific transform component type to use when transforming with a modeltemplate
: a string representation of a jinja template; takes precedence over template_ordertemplate_order
: a template ordering to use when searching for applicable templatesparsing_func
: not yet implementedstringify_func
: used to create a string representation of the objectmellea.stdlib.mify._mify(obj: T | None = None, query_type: type = Query, transform_type: type = Transform, fields_include: set[str] | None = None, fields_exclude: set[str] | None = None, funcs_include: set[str] | None = None, funcs_exclude: set[str] | None = None, template: str | None = None, template_order: str | list[str] | None = None, parsing_func: Callable[[str], object] | None = None, stringify_func: Callable[[object], str] | None = None)
mellea.stdlib.mify._get_non_duplicate_members(object: object, check_duplicates: object)
mellea.stdlib.mify._get_non_duplicate_fields(object: object, check_duplicates: object)
class mellea.stdlib.mify.MifiedProtocol()
mellea.stdlib.mify.MifiedProtocol.parts()
mellea.stdlib.mify.MifiedProtocol.get_query_object(query: str)
query
: The query string.mellea.stdlib.mify.MifiedProtocol.get_transform_object(transformation: str)
transformation
: the transform stringmellea.stdlib.mify.MifiedProtocol.content_as_string()
mellea.stdlib.mify.MifiedProtocol._get_all_members()
object
base class.
Undocumented methods and methods with [no-index] in doc string are ignored.
It will also take into consideration its funcs_include and funcs_exclude fields.
Functions that were specifically included will ignore the undocumented and [no-index] requirements.
See mify decorator for more info.
mellea.stdlib.mify.MifiedProtocol._get_all_fields()
object
superclass.
This will return dunder fields as well. As a result, it’s advised to always set
fields_include if using this.
[no-index]
It will also take into consideration its fields_include and fields_exclude fields.
See mify decorator for more info.
mellea.stdlib.mify.MifiedProtocol.format_for_llm()