Entity objects

entity - class decorator

Source on GitHub

	model_class: Any = None


The entity decorator is used on classes to allow the Pipeline context manager to treat them as model objects. A model can contain pipe decorated functions and allows for persistent logic to be present inside of the wrapped class (for caching etc).


  • model_class (Any, optional) - The model class to be wrapped, this is implicitly passed in you do not manually pass this.


from pipeline import Pipeline, entity


class MyModel:
	def __init__(self, ...):

with Pipeline() as builder:
  my_model = MyModel()