core.metadata ============= .. py:module:: core.metadata .. autoapi-nested-parse:: Metadata about the instance, available through HTTP. Classes ------- .. autoapisummary:: core.metadata.Metadata core.metadata.PublicMetadata core.metadata.SecretMetadata Functions --------- .. autoapisummary:: core.metadata.public_property core.metadata.get_public_metadata core.metadata.get_private_metadata core.metadata.view_public_metadata core.metadata.view_secret_metadata core.metadata.render_metadata Module Contents --------------- .. py:function:: public_property(fn: Callable[[Any], Any]) -> property .. py:class:: Metadata(app: onegov.core.framework.Framework, absorb: str | None = None) .. py:attribute:: app .. py:attribute:: absorb :value: None .. py:attribute:: path .. py:method:: for_audiences(*audiences: Literal['public', 'secret']) -> dict[str, Any] Returns a dict with the metadata for the given audience(s). .. py:property:: fqdn :type: str Returns the fqdn of the host running the site. .. py:property:: application_id :type: str .. py:property:: identity :type: str Each instance has a unqiue identity formed out of the hostname and the application id. .. py:class:: PublicMetadata(app: onegov.core.framework.Framework, absorb: str | None = None) Bases: :py:obj:`Metadata` .. py:method:: as_dict() -> dict[str, Any] .. py:class:: SecretMetadata(app: onegov.core.framework.Framework, absorb: str | None = None) Bases: :py:obj:`Metadata` .. py:method:: as_dict() -> dict[str, Any] .. py:function:: get_public_metadata(app: onegov.core.framework.Framework, absorb: str) -> PublicMetadata .. py:function:: get_private_metadata(app: onegov.core.framework.Framework, absorb: str) -> SecretMetadata .. py:function:: view_public_metadata(self: PublicMetadata, request: core.request.CoreRequest) -> morepath.Response .. py:function:: view_secret_metadata(self: PublicMetadata, request: core.request.CoreRequest) -> morepath.Response .. py:function:: render_metadata(self: PublicMetadata | SecretMetadata, request: core.request.CoreRequest) -> morepath.Response