Skip to content

base_asset_funcs module

Base asset function classes.


AssetFunc class

AssetFunc()

Abstract class representing an asset function.

Superclasses

Inherited members

Subclasses


call class method

AssetFunc.call(
    d,
    *args,
    **kwargs
)

Call the function.


prepare class method

AssetFunc.prepare(
    *args,
    **kwargs
)

Prepare positional and keyword arguments.


prepare_and_call class method

AssetFunc.prepare_and_call(
    d,
    *args,
    **kwargs
)

Prepare arguments and call the function.


CollectAssetFunc class

CollectAssetFunc()

Asset function class for KnowledgeAsset.collect.

Superclasses

Inherited members


sort_key class method

CollectAssetFunc.sort_key(
    k
)

Function for sorting keys.


DumpAssetFunc class

DumpAssetFunc()

Asset function class for KnowledgeAsset.dump.

Superclasses

Inherited members


resolve_dump_kwargs class method

DumpAssetFunc.resolve_dump_kwargs(
    dump_engine=None,
    asset_cls=None,
    **kwargs
)

Resolve keyword arguments related to dumping.


FindAssetFunc class

FindAssetFunc()

Asset function class for KnowledgeAsset.find.

Superclasses

Inherited members

Subclasses


match_func class method

FindAssetFunc.match_func(
    k,
    d,
    target,
    find_all=False,
    **kwargs
)

Match function for FindAssetFunc.call.

Uses find with return_type="bool" for text, and equality checks for other types.

Target can be a function taking the value and returning a boolean. Target can also be an instance of Not for negation.


FindRemoveAssetFunc class

FindRemoveAssetFunc()

Asset function class for KnowledgeAsset.find_remove.

Superclasses

Inherited members


is_empty_func class method

FindRemoveAssetFunc.is_empty_func(
    d
)

Return whether object is empty.


FindReplaceAssetFunc class

FindReplaceAssetFunc()

Asset function class for KnowledgeAsset.find_replace.

Superclasses

Inherited members


replace_func class method

FindReplaceAssetFunc.replace_func(
    k,
    d,
    target,
    replacement,
    **kwargs
)

Replace function for FindReplaceAssetFunc.call.

Uses replace for text and returns replacement for other types.

Target can be a function taking the value and returning a boolean. Replacement can also be a function taking the value and returning a new value.


FlattenAssetFunc class

FlattenAssetFunc()

Asset function class for KnowledgeAsset.flatten.

Superclasses

Inherited members


GetAssetFunc class

GetAssetFunc()

Asset function class for KnowledgeAsset.get.

Superclasses

Inherited members


MergeDictsAssetFunc class

MergeDictsAssetFunc()

Asset function class for KnowledgeAsset.merge_dicts.

Superclasses

Inherited members


MergeListsAssetFunc class

MergeListsAssetFunc()

Asset function class for KnowledgeAsset.merge_lists.

Superclasses

Inherited members


MoveAssetFunc class

MoveAssetFunc()

Asset function class for KnowledgeAsset.move.

Superclasses

Inherited members

Subclasses


QueryAssetFunc class

QueryAssetFunc()

Asset function class for KnowledgeAsset.query.

Superclasses

Inherited members


ReduceAssetFunc class

ReduceAssetFunc()

Abstract asset function class for KnowledgeAsset.reduce.

Superclasses

Inherited members

Subclasses


RemoveAssetFunc class

RemoveAssetFunc()

Asset function class for KnowledgeAsset.remove.

Superclasses

Inherited members


RenameAssetFunc class

RenameAssetFunc()

Asset function class for KnowledgeAsset.rename.

Superclasses

Inherited members


ReorderAssetFunc class

ReorderAssetFunc()

Asset function class for KnowledgeAsset.reorder.

Superclasses

Inherited members


SetAssetFunc class

SetAssetFunc()

Asset function class for KnowledgeAsset.set.

Superclasses

Inherited members


SplitTextAssetFunc class

SplitTextAssetFunc()

Asset function class for KnowledgeAsset.split_text.

Superclasses

Inherited members


ToDocsAssetFunc class

ToDocsAssetFunc()

Asset function class for KnowledgeAsset.to_documents.

Superclasses

Inherited members


UnflattenAssetFunc class

UnflattenAssetFunc()

Asset function class for KnowledgeAsset.unflatten.

Superclasses

Inherited members