core.metadata

Metadata about the instance, available through HTTP.

Classes

Metadata

PublicMetadata

SecretMetadata

Functions

public_property(→ property)

get_public_metadata(→ PublicMetadata)

get_private_metadata(→ SecretMetadata)

view_public_metadata(→ morepath.Response)

view_secret_metadata(→ morepath.Response)

render_metadata(→ morepath.Response)

Module Contents

core.metadata.public_property(fn: Callable[[Any], Any]) property[source]
class core.metadata.Metadata(app: onegov.core.framework.Framework, absorb: str | None = None)[source]
app[source]
absorb[source]
path[source]
for_audiences(*audiences: Literal['public', 'secret']) dict[str, Any][source]

Returns a dict with the metadata for the given audience(s).

property fqdn: str[source]

Returns the fqdn of the host running the site.

property application_id: str[source]
property identity: str[source]

Each instance has a unqiue identity formed out of the hostname and the application id.

class core.metadata.PublicMetadata(app: onegov.core.framework.Framework, absorb: str | None = None)[source]

Bases: Metadata

as_dict() dict[str, Any][source]
class core.metadata.SecretMetadata(app: onegov.core.framework.Framework, absorb: str | None = None)[source]

Bases: Metadata

as_dict() dict[str, Any][source]
core.metadata.get_public_metadata(app: onegov.core.framework.Framework, absorb: str) PublicMetadata[source]
core.metadata.get_private_metadata(app: onegov.core.framework.Framework, absorb: str) SecretMetadata[source]
core.metadata.view_public_metadata(self: PublicMetadata, request: core.request.CoreRequest) morepath.Response[source]
core.metadata.view_secret_metadata(self: PublicMetadata, request: core.request.CoreRequest) morepath.Response[source]
core.metadata.render_metadata(self: PublicMetadata | SecretMetadata, request: core.request.CoreRequest) morepath.Response[source]