--- title: Itembase keywords: fastai sidebar: home_sidebar nb_path: "nbs/itembase.ipynb" ---
Any data class in pyintegrators inherits from ItemBase
. As its name suggests it is a base class for items with some handy functionalities to create new items and edges, retrieve all edges to other items, and sync with the pod.
With the ItemBase
and Edge
classes we can create an item and its surrounding graph. The schema is defined in schema.py, in general we want to use the from_data staticmethod to generate new items, because it ensures that edges are linked from both the source and the target object. Let's make an email item and create it in the pod.
item = EmailMessage.from_data(content="example content field")