security_policy#
- scikitplot.mlflow.security_policy(policy)[source]#
Temporarily activate a
SecurityPolicyfor a context block.- Parameters:
- policySecurityPolicy or None
Policy to activate. Pass
Noneto disable enforcement within the block.
- Yields:
- None
- Parameters:
policy (SecurityPolicy | None)
- Return type:
Iterator[None]
See also
set_security_policySet the active policy globally.
Notes
Exception-safe: previous policy is always restored on exit.
Examples
>>> from scikitplot.mlflow._security import DEFAULT_SECURITY_POLICY, security_policy >>> with security_policy(DEFAULT_SECURITY_POLICY): ... pass # session() calls here are guarded