Object
Each created pipeline can be accessed in a dictionary at the pyot.conf.pipeline module. The key of the pipeline is the name provided in the configuration, if the pipeline is set as default, model name can be used aswell.
from pyot.conf.pipeline import pipelines
lol_pipeline = pipelines["lol"]class Pipeline
PipelineDefinitions:
__init__model:strModel of belonging.
name:strName of pipeline.
stores:List[Store]List of Stores to add on the pipeline.
__iter__Iterates over
stores.__getitem__Get store by index.
Attributes:
model:strname:strstores:List[StoreObject]sessions:ResourceTemplate[aiohttp.ClientSession]
Methods:
async
get->Anytoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.
async
set->Nonetoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.value:AnyData to be stored in qualified stores.
stop:Store = NoneThe instance of the store that it should stop at (not sink further).
async
post->Anytoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.body->AnyBody of the request.
async
put->Anytoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.body->AnyBody of the request.
async
clear->NoneClear data in all stores.
async
expire->NoneExpire data in all the stores, used for stores that cannot automatically expire data on its own.
async
delete->Nonetoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.
async
contains->booltoken:PipelineTokenToken identifying the data, created by
token()on Pyot Core objects.
Example
from pyot.conf.pipeline import pipelines
from pyot.utils.runners import loop_run
async def clear_cache_lol():
lol_pipeline = pipelines["lol"]
await lol_pipeline.clear()
loop_run(clear_everything())Last updated