-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
booger plug that adapts as-is strfry write policy plugins for use with booger #4
Labels
Comments
import os
class BoogerPlugin:
def __init__(self, policy_folder):
self.policy_folder = policy_folder
def apply_strfry_policies(self):
# Get a list of files in the policy folder
policy_files = [f for f in os.listdir(self.policy_folder) if os.path.isfile(os.path.join(self.policy_folder, f))]
# Apply each strfry policy
for policy_file in policy_files:
policy_path = os.path.join(self.policy_folder, policy_file)
strfry_policy = self.load_strfry_policy(policy_path)
self.apply_policy(strfry_policy)
def load_strfry_policy(self, policy_path):
# Load strfry policy from the given file path
# Implement logic to parse the policy file and return the policy object
pass
def apply_policy(self, strfry_policy):
# Apply the strfry policy
# Implement logic to integrate strfry policy with booger
pass
# Example usage
booger_plugin = BoogerPlugin(policy_folder='/path/to/strfry_policies')
booger_plugin.apply_strfry_policies() Implementation Description: This Python code defines a
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There might folks using strfry write policy plugins that they'd like to continue using with booger.
We can support this with a booger plug that allows strfry policies to be dropped in a folder and used with booger.
The text was updated successfully, but these errors were encountered: