Model
- class perses_api.model.APIEndpoints[source]
-
The enum includes all necessary API endpoint path templates for the Perses API
- DASHBOARD = '/api/v1/projects/{project}/dashboards/{name}'
- DASHBOARDS = '/api/v1/projects/{project}/dashboards'
- DATASOURCE = '/api/v1/projects/{project}/datasources/{name}'
- DATASOURCES = '/api/v1/projects/{project}/datasources'
- EPHEMERAL_DASHBOARD = '/api/v1/projects/{project}/ephemeraldashboards/{name}'
- EPHEMERAL_DASHBOARDS = '/api/v1/projects/{project}/ephemeraldashboards'
- GLOBAL_DATASOURCE = '/api/v1/globaldatasources/{name}'
- GLOBAL_DATASOURCES = '/api/v1/globaldatasources'
- GLOBAL_ROLE = '/api/v1/globalroles/{name}'
- GLOBAL_ROLES = '/api/v1/globalroles'
- GLOBAL_ROLE_BINDING = '/api/v1/globalrolebindings/{name}'
- GLOBAL_ROLE_BINDINGS = '/api/v1/globalrolebindings'
- GLOBAL_SECRET = '/api/v1/globalsecrets/{name}'
- GLOBAL_SECRETS = '/api/v1/globalsecrets'
- GLOBAL_VARIABLE = '/api/v1/globalvariables/{name}'
- GLOBAL_VARIABLES = '/api/v1/globalvariables'
- MIGRATE = '/api/migrate'
- PLUGINS = '/api/v1/plugins'
- PROJECT = '/api/v1/projects/{project}'
- PROJECTS = '/api/v1/projects'
- ROLE = '/api/v1/projects/{project}/roles/{name}'
- ROLES = '/api/v1/projects/{project}/roles'
- ROLE_BINDING = '/api/v1/projects/{project}/rolebindings/{name}'
- ROLE_BINDINGS = '/api/v1/projects/{project}/rolebindings'
- SECRET = '/api/v1/projects/{project}/secrets/{name}'
- SECRETS = '/api/v1/projects/{project}/secrets'
- USER = '/api/v1/users/{name}'
- USERS = '/api/v1/users'
- VALIDATE = '/api/validate/{resource_type}'
- VARIABLE = '/api/v1/projects/{project}/variables/{name}'
- VARIABLES = '/api/v1/projects/{project}/variables'
- __new__(value)
- class perses_api.model.APIModel[source]
Bases:
objectThe dataclass includes all necessary values and information to access the Perses API
- Parameters:
host (str) – Specify the host of the Perses instance
token (str) – Specify the bearer token for authentication (default None)
username (str) – Specify the username for basic authentication (default None)
password (str) – Specify the password for basic authentication (default None)
timeout (float) – Specify the timeout of the API call (default 10.0)
headers (dict) – Specify additional HTTP headers to include in every request (default None)
http2_support (bool) – Specify if HTTP/2 should be used (default False)
ssl_context (any) – Specify a custom SSL context or certificate path (default None)
num_pools (int) – Specify the maximum number of HTTP connections (default 10)
retries (any) – Specify the number of retries or a retry object (default False)
follow_redirects (bool) – Specify if HTTP redirects should be followed (default True)
- class perses_api.model.Dashboard[source]
Bases:
_CamelModelThe class includes all necessary values to represent a Perses dashboard resource
- Parameters:
kind (str) – Specify the resource kind (default Dashboard)
metadata (Metadata) – Specify the resource metadata
spec (DashboardSpec) – Specify the dashboard spec (default DashboardSpec)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: DashboardSpec
- class perses_api.model.DashboardSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses dashboard resource
- Parameters:
display (dict) – Specify optional display properties (default None)
datasources (dict) – Specify the datasource references used by the dashboard (default None)
variables (list) – Specify the dashboard-scoped variables (default None)
panels (dict) – Specify the panel definitions keyed by panel ID (default None)
layouts (list) – Specify the layout configuration for the panels (default None)
duration (str) – Specify the default time range duration, e.g. 1h (default None)
refresh_interval (str) – Specify the default auto-refresh interval, e.g. 30s (default None)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.Datasource[source]
Bases:
_CamelModelThe class includes all necessary values to represent a project-scoped Perses datasource resource
- Parameters:
kind (str) – Specify the resource kind (default Datasource)
metadata (Metadata) – Specify the resource metadata including project
spec (DatasourceSpec) – Specify the datasource spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: DatasourceSpec
- class perses_api.model.DatasourceSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses datasource resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.EphemeralDashboard[source]
Bases:
_CamelModelThe class includes all necessary values to represent a Perses ephemeral dashboard resource
- Parameters:
kind (str) – Specify the resource kind (default EphemeralDashboard)
metadata (Metadata) – Specify the resource metadata
spec (EphemeralDashboardSpec) – Specify the ephemeral dashboard spec including TTL
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: EphemeralDashboardSpec
- class perses_api.model.EphemeralDashboardSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses ephemeral dashboard resource
- Parameters:
ttl (str) – Specify the time-to-live duration after which the dashboard is deleted, e.g. 1h
display (dict) – Specify optional display properties (default None)
datasources (dict) – Specify the datasource references used by the dashboard (default None)
variables (list) – Specify the dashboard-scoped variables (default None)
panels (dict) – Specify the panel definitions keyed by panel ID (default None)
layouts (list) – Specify the layout configuration for the panels (default None)
duration (str) – Specify the default time range duration (default None)
refresh_interval (str) – Specify the default auto-refresh interval (default None)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.GlobalDatasource[source]
Bases:
_CamelModelThe class includes all necessary values to represent a global Perses datasource resource
- Parameters:
kind (str) – Specify the resource kind (default GlobalDatasource)
metadata (Metadata) – Specify the resource metadata
spec (DatasourceSpec) – Specify the datasource spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: DatasourceSpec
- class perses_api.model.GlobalRole[source]
Bases:
_CamelModelThe class includes all necessary values to represent a global Perses role resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.GlobalRoleBinding[source]
Bases:
_CamelModelThe class includes all necessary values to represent a global Perses role binding resource
- Parameters:
kind (str) – Specify the resource kind (default GlobalRoleBinding)
metadata (Metadata) – Specify the resource metadata
spec (RoleBindingSpec) – Specify the role binding spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: RoleBindingSpec
- class perses_api.model.GlobalSecret[source]
Bases:
_CamelModelThe class includes all necessary values to represent a global Perses secret resource
- Parameters:
kind (str) – Specify the resource kind (default GlobalSecret)
metadata (Metadata) – Specify the resource metadata
spec (SecretSpec) – Specify the secret spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: SecretSpec
- class perses_api.model.GlobalVariable[source]
Bases:
_CamelModelThe class includes all necessary values to represent a global Perses variable resource
- Parameters:
kind (str) – Specify the resource kind (default GlobalVariable)
metadata (Metadata) – Specify the resource metadata
spec (VariableSpec) – Specify the variable spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: VariableSpec
- class perses_api.model.Metadata[source]
Bases:
_CamelModelThe class includes the common metadata envelope shared by all Perses resources
- Parameters:
name (str) – Specify the name of the resource
project (str) – Specify the project the resource belongs to (default None)
created_at (str) – Specify the creation timestamp (default None)
updated_at (str) – Specify the last update timestamp (default None)
version (int) – Specify the resource version for optimistic concurrency (default None)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.Permission[source]
Bases:
_CamelModelThe class includes a single permission entry for a Perses role
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.PluginEntry[source]
Bases:
_CamelModelThe class includes a single plugin entry within a plugin module
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.PluginMetadata[source]
Bases:
_CamelModelThe class includes the metadata for a Perses plugin module
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.PluginModule[source]
Bases:
_CamelModelThe class includes all necessary values to represent a Perses plugin module resource
- Parameters:
kind (str) – Specify the resource kind (default PluginModule)
metadata (PluginMetadata) – Specify the plugin module metadata including name and version
spec (PluginModuleSpec) – Specify the plugin module spec (default PluginModuleSpec)
- metadata: PluginMetadata
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: PluginModuleSpec
- class perses_api.model.PluginModuleSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses plugin module resource
- Parameters:
schemas_path (str) – Specify the path to the plugin schemas directory (default None)
plugins (list[PluginEntry]) – Specify the list of plugins provided by this module (default [])
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- plugins: list[PluginEntry]
- class perses_api.model.Project[source]
Bases:
_CamelModelThe class includes all necessary values to represent a Perses project resource
- Parameters:
kind (str) – Specify the resource kind (default Project)
metadata (Metadata) – Specify the resource metadata
spec (ProjectSpec) – Specify the project spec (default ProjectSpec)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: ProjectSpec
- class perses_api.model.ProjectSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses project resource
- Parameters:
display (dict) – Specify optional display properties such as a human-readable name (default None)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.RequestsMethods[source]
-
The enum includes all necessary methods to access the Perses API
- DELETE = 'DELETE'
- GET = 'GET'
- POST = 'POST'
- PUT = 'PUT'
- __new__(value)
- class perses_api.model.Role[source]
Bases:
_CamelModelThe class includes all necessary values to represent a project-scoped Perses role resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.RoleBinding[source]
Bases:
_CamelModelThe class includes all necessary values to represent a project-scoped Perses role binding resource
- Parameters:
kind (str) – Specify the resource kind (default RoleBinding)
metadata (Metadata) – Specify the resource metadata including project
spec (RoleBindingSpec) – Specify the role binding spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: RoleBindingSpec
- class perses_api.model.RoleBindingSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses role binding resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.RoleSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses role resource
- Parameters:
permissions (list[Permission]) – Specify the list of permissions granted by the role (default [])
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- permissions: list[Permission]
- class perses_api.model.Secret[source]
Bases:
_CamelModelThe class includes all necessary values to represent a project-scoped Perses secret resource
- Parameters:
kind (str) – Specify the resource kind (default Secret)
metadata (Metadata) – Specify the resource metadata including project
spec (SecretSpec) – Specify the secret spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: SecretSpec
- class perses_api.model.SecretSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses secret resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.Subject[source]
Bases:
_CamelModelThe class includes a single subject entry for a Perses role binding
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.User[source]
Bases:
_CamelModelThe class includes all necessary values to represent a Perses user resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.UserSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses user resource
- Parameters:
first_name (str) – Specify the user’s first name (default None)
last_name (str) – Specify the user’s last name (default None)
native_provider (dict) – Specify the native authentication provider config including password (default None)
oauth_providers (list) – Specify the list of OAuth provider configurations (default None)
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class perses_api.model.Variable[source]
Bases:
_CamelModelThe class includes all necessary values to represent a project-scoped Perses variable resource
- Parameters:
kind (str) – Specify the resource kind (default Variable)
metadata (Metadata) – Specify the resource metadata including project
spec (VariableSpec) – Specify the variable spec
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- spec: VariableSpec
- class perses_api.model.VariableSpec[source]
Bases:
_CamelModelThe class includes the spec for a Perses variable resource
- Parameters:
- model_config = {'alias_generator': <function to_camel>, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].