Tools for working with PAN-OS Skillets in Python 3
Project description
Skilletlib
Base Classes and Utilities for working with Skillets. Skilletlib encapsulates all the logic necessary to execute a skillet in your app or tooling.
Basic Example
from skilletlib import SkilletLoader
# init SkilletLoader Class
sl = SkilletLoader()
# Load all skillets from the current directory
skillets = sl.load_all_skillets_from_dir('.')
# get the first skillet found
skillet = skillets[0]
# Every skillet requires a context, which is a dict containing
# any user-input or other variables
context = dict()
# In this example, our skillet needs a configuration.xml file to be loaded into a variable
# called 'config'
with open('config.xml', 'r') as config:
context['config'] = config.read()
# execute the skillet and return the results
out = skillet.execute(context)
# Do something interesting with the results, like print it out :-)
print(out)
print('all done')
Loading Skillets from a Git repository
from skilletlib import SkilletLoader
repo_url = 'https://github.com/nembery/Skillets'
repo_branch = 'develop'
directory = '/var/tmp/skillets'
repo_name = 'example skillets'
sl = SkilletLoader()
skillets = sl.load_from_git(repo_url, repo_name, repo_branch, local_dir=directory)
for s in skillets:
print(s.name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
skilletlib-0.1.2.8.tar.gz
(43.2 kB
view hashes)
Built Distribution
Close
Hashes for skilletlib-0.1.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50debd87116b1def363ffe0bd72561dd5f9ca244ac978d50bc67cb455042dc56 |
|
MD5 | a02d486b0b7086fe68c53e872e4e9f29 |
|
BLAKE2b-256 | 3b297211431e60ddc88ccf55dc44a24d2ae3dcec14a76851f91670bac5043d1f |