Skip to main content

leaf

superduper.base.leaf

Source code

imported​

imported(f)
ParameterDescription
fThe function or class to wrap.

Wrap a function or class to be imported.

imported_value​

imported_value(f)
ParameterDescription
fThe function or class to wrap.

Wrap a import to be serialized as a fixed value.

import_item​

import_item(dict,
cls: Optional[str] = None,
module: Optional[str] = None,
object: Optional[type] = None,
db: Optional[ForwardRef('Datalayer')] = None)
ParameterDescription
dictDictionary of parameters.
clsClass name.
moduleModule name.
objectObject to instantiate.
dbDatalayer instance.

Import item from a cls and module specification.

build_uuid​

build_uuid()

Build UUID.

find_leaf_cls​

find_leaf_cls(full_import_path) -> Type[superduper.base.leaf.Leaf]
ParameterDescription
full_import_pathFull import path of the class.

Find leaf class by class full import path.

Leaf​

Leaf(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.

Base class for all leaf classes.

Address​

Address(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.

Address is a base class for all address classes.

Attribute​

Attribute(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
parent: superduper.base.leaf.Address,
attribute: str) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
parentThe parent class.
attributeThe attribute to get.

An Attribute is a class that represents an attribute of a parent class.

Import​

Import(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
import_path: str | None,
parent: dataclasses.InitVar[typing.Optional[typing.Any]] = None,
args: Optional[Tuple] = None,
kwargs: Optional[Dict] = None) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
import_pathThe import path of the class.
parentThe parent class.
argsPositional arguments to pass to the class.
kwargsKeyword arguments to pass to the class.

Import is a class that imports a class from a module.

ImportCall​

ImportCall(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
import_path: str,
args: Tuple = (),
kwargs: None = <factory>) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
import_pathThe import path of the function.
argsPositional arguments to pass to the function.
kwargsKeyword arguments to pass to the function.

ImportCall is a class that imports a function from a module and calls it.

Index​

Index(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
parent: superduper.base.leaf.Leaf,
index: int) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
parentThe parent class.
indexThe index to get.

An Index is a class that represents an index of a parent class.