feriennet.boardlets

Classes

FeriennetBoardlet

Base class used by all boardlets.

PeriodBoardlet

Base class used by all boardlets.

ActivitiesBoardlet

Base class used by all boardlets.

BookingsBoardlet

Base class used by all boardlets.

AttendeesBoardlet

Base class used by all boardlets.

MatchingBoardlet

Base class used by all boardlets.

BillingPortlet

Base class used by all boardlets.

Module Contents

class feriennet.boardlets.FeriennetBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.models.Boardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
request: onegov.feriennet.request.FeriennetRequest[source]
property session: sqlalchemy.orm.Session[source]
property period: PeriodMeta | None[source]
property layout: onegov.feriennet.layout.DefaultLayout[source]
property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

class feriennet.boardlets.PeriodBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

class feriennet.boardlets.ActivitiesBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property occasions: Query[Occasion][source]
property occasions_count: int[source]
property activities_count: int[source]
occasion_states() dict[onegov.feriennet.collections.match.OccasionState, int][source]
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

class feriennet.boardlets.BookingsBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property counts: dict[BookingState | Literal['total'], int][source]
property attendees_count: int[source]
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

class feriennet.boardlets.AttendeesBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property attendee_counts: dict[str, int][source]
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

class feriennet.boardlets.MatchingBoardlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property happiness: float[source]
property unlucky_count: int[source]
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)

class feriennet.boardlets.BillingPortlet(name: str, order: tuple[int, int], request: onegov.org.request.OrgRequest)[source]

Bases: FeriennetBoardlet

Base class used by all boardlets.

Use as follows:

from onegov.app import App

@App.boardlet(name='foo', order=(1, 1))
class MyBoardlet(Boardlet):
    pass
property amounts: dict[str, decimal.Decimal][source]
property title: str[source]

Returns the title of the boardlet, which is meant to be something meaningful, like the most important metric used in the boardlet.

property state: Literal['success', 'warning', 'failure'][source]

Yields one of three states:

  • ‘success’

  • ‘warning’

  • ‘failure’

property facts: Iterator[BoardletFact][source]

Yields facts. (BoardletFact instances)