pepper.framework.abstract.component module

class pepper.framework.abstract.component.AbstractComponent(backend)[source]

Bases: object

Abstract Base Component on which all Components are Based

Parameters:backend (AbstractBackend) – Application AbstractBackend
backend

Application AbstractBackend

Returns:backend
Return type:AbstractBackend
log

//docs.python.org/2/library/logging.html>`_

Returns:logger
Return type:logging.Logger
Type:Returns Component `Logger <https
require(cls, dependency)[source]

Enforce Component Dependency by throwing an Exception when a dependency is missing

Checks whether Dependency Component is present in the Method Resolution Order (mro)

Parameters:
  • cls (type) – Dependent: Component Type requiring dependency
  • dependency (type) – Dependency: Component Type being dependency
Returns:

dependency – Requested Dependency

Return type:

AbstractComponent

exception pepper.framework.abstract.component.ComponentDependencyError[source]

Bases: exceptions.Exception

Raised when a Component Dependency hasn’t been met