Skip to content

Module bastionlab.polars.policy

Variables

DEFAULT_POLICY
Default BastionLab Client Policy Policy(safe_zone=Aggregation(10), unsafe_handling=Review(), savable=True)
Rule
A Policy Rule.
UnsafeAction
Defines how unsafe actions should be handled.

Classes

Aggregation(min_agg_size: int)

Specifies a Rule for the number of rows an operation on a Remote DataFrame can aggregate.

Args: min_agg_size : int The minimum allowable row aggregation size.

Class variables

min_agg_size: int :

AtLeastNOf(n: int, of: List[Union[ForwardRef('AtLeastNOf'), ForwardRef('Aggregation'), ForwardRef('TrueRule'), ForwardRef('FalseRule'), ForwardRef('UserId')]])

specifies a collection of Rules.

Args: n : int Specifies the number of rules to combine. of : List[Rule] Collection of rules.

Class variables

n: int :

of: List[Union[bastionlab.polars.policy.AtLeastNOf, bastionlab.polars.policy.Aggregation, bastionlab.polars.policy.TrueRule, bastionlab.polars.policy.FalseRule, bastionlab.polars.policy.UserId]] :

FalseRule()
BastionLab instruction Rule for boolean logic False.
Log()
Instructs the BastionLab server to log the operation performed on the associated Remote DataFrame.
Policy(safe_zone: Union[ForwardRef('AtLeastNOf'), ForwardRef('Aggregation'), ForwardRef('TrueRule'), ForwardRef('FalseRule'), ForwardRef('UserId')], unsafe_handling: Union[ForwardRef('Log'), ForwardRef('Review'), ForwardRef('Reject')], savable: bool)

BastionLab Policy class.

Express the allowable operations on Remote DataFrames [RDFs] (i.e., DataFrames on the BastionLab server).

Args: safe_zone : Rule Describes what operations are considered safe on the RDF. unsafe_handling : UnsafeAction Describes what should happen if a user violates the safe_zone. For example (logging operations)

Class variables

safe_zone: Union[bastionlab.polars.policy.AtLeastNOf, bastionlab.polars.policy.Aggregation, bastionlab.polars.policy.TrueRule, bastionlab.polars.policy.FalseRule, bastionlab.polars.policy.UserId] :

savable: bool :

unsafe_handling: Union[bastionlab.polars.policy.Log, bastionlab.polars.policy.Review, bastionlab.polars.policy.Reject] :

Reject()
Instructs the BastionLab server to reject the request.
Review()
Instructs the BastionLab server to request a review from the owner of the Remote DataFrame.
TrueRule()
BastionLab instruction Rule for boolean logic True.
UserId(id: str)

BastionLab instruction Rule that attaches a user identifier to the safe zone.

Args: id : str User Identifier.

Class variables

id: str :