betty.project.extension.requirement module - Betty 0.4.0a3 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.project.extension.requirement module

Provide requirements for Betty’s extension API.

class betty.project.extension.requirement.Dependencies

  Bases: `AllRequirements`

  Check a dependent’s dependency requirements.

  Parameters:

    dependent (`type`[`betty.project.extension.Extension`])

  __init__(dependent: type[betty.project.extension.Extension])
    Parameters:

      dependent (`type`[`betty.project.extension.Extension`])

  async summary() → betty.locale.localizable.Localizable

    Get the requirement’s human-readable summary.

    Return type:

      `betty.locale.localizable.Localizable`

class betty.project.extension.requirement.Dependents

  Bases: `Requirement`

  Check a dependency’s dependent requirements.

  Parameters:

    dependency (`betty.project.extension.Extension`)

  __init__(dependency: betty.project.extension.Extension)
    Parameters:

      dependency (`betty.project.extension.Extension`)

  async is_met() → bool

    Check if the requirement is met.

    Return type:

      `bool`

  async summary() → betty.locale.localizable.Localizable

    Get the requirement’s human-readable summary.

    Return type:

      `betty.locale.localizable.Localizable`