pipelines.registry module#
- class pipelines.registry.PipeLineRegistry#
Bases:
Registry
Registry to contain all pipelines within the project.
- class pipelines.registry.Registrable#
Bases:
object
Base class for any class that should be registered in a registry.
- classmethod get_id()#
Returns an id for to be used in registration
- classmethod get_urls()#
Builds a list of urls for the registrable object
- class pipelines.registry.Registry(module_name=None)#
Bases:
object
Bucket to store and retrieve registered classes
- autodiscover()#
Searches all installed apps for modules matching the
model_name
so that classes can register themselves.
- get_all_items()#
Returns all the items in the registry
- get_by_app_label(app_label: str)#
Returns all registered elements filtered by the provided app label
- Parameters:
app_label – The app label to filter objects by
- get_by_classname(app_label: str, classname: str)#
Gets an item from teh registry.
- Parameters:
app_label – The app label the registered item belongs to
classname – The name of the class to fetch
- get_by_id(_id)#
Gets a specific element from the registry
- get_urls()#
Returns a list of all urls from registered classes
- items: List[Type[Registrable]]#
- register(cls)#
Adds the provided class to the registry
- Parameters:
cls – The class to add
- remove(item)#
Removes the provided item from the registry
- Parameters:
item – The item to remove
- reset()#
Removes all items from the registry and flags it as not yet being discovered
- property urls#
A list of all urls from registered classes