oso.framework.plugin.test namespace

Submodules

oso.framework.plugin.test.isv_cls module

Example plugin implemented as a class.

class oso.framework.plugin.test.isv_cls.TestISVApp[source]

Bases: PluginProtocol

Example plugin implemented as a class.

internalViews
Type:

dict[str, flask.views.View]

externalViews
Type:

dict[str, flask.views.View]

status() ComponentStatus[source]

Return a downstream component’s status.

Returns:

The downstream’s component status.

Return type:

oso.framework.data.types.ComponentStatus

to_isv(oso: DocumentList) list[str][source]

Convert from OSO to ISV.

Convert an OSO’s format into an ISV’s format, say a list of ID:Content

Parameters:

oso (oso.framework.data.types.DocumentList) – An OSO formatted input data stream.

Returns:

An ISV formatted output data stream.

Return type:

list[str]

to_oso(isv: Any = None) DocumentList[source]

Convert from ISV to OSO.

Say an ISV’s format is a list of ID:Content, convert to OSO’s format.

Parameters:

isv (typing.Any, default=None) – An ISV formatted input data stream.

Returns:

An OSO formatted output data stream.

Return type:

oso.framework.data.types.DocumentList

oso.framework.plugin.test.isv_mod module

Example plugin implemented as a module.

oso.framework.plugin.test.isv_mod.status() ComponentStatus[source]

Return a downstream component’s status.

Returns:

The downstream’s component status.

Return type:

oso.framework.data.types.ComponentStatus

oso.framework.plugin.test.isv_mod.to_isv(oso: DocumentList) list[str][source]

Convert from OSO to ISV.

Convert an OSO’s format into an ISV’s format, say a list of ID:Content

Parameters:

oso (oso.framework.data.types.DocumentList) – An OSO formatted input data stream.

Returns:

An ISV formatted output data stream.

Return type:

list[str]

oso.framework.plugin.test.isv_mod.to_oso(isv: Any = None) DocumentList[source]

Convert from ISV to OSO.

Say an ISV’s format is a list of ID:Content, convert to OSO’s format.

Parameters:

isv (typing.Any, default=None) – An ISV formatted input data stream.

Returns:

An OSO formatted output data stream.

Return type:

oso.framework.data.types.DocumentList

oso.framework.plugin.test.isv_view module

Example extra endpoints for plugins.

class oso.framework.plugin.test.isv_view.InView[source]

Bases: MethodView

Example View.

A view that implements a GET endpoint that returns a JSON message.

get()[source]

GET Endpoint.

methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.