Swimlane Bundle Development Package
Project description
PyAppHub
Python package for Swimlane AppHub API
Install
run pip install apphub
from a terminal. This package is available for python 2 and python 3.
Examples
Below are a few basic python examples to get started.
Note: If sw_
is not found at the beginning of a name, the client will
add it for you.
from apphub import AppHub, save_to_disk, clean_response
ah = AppHub('username', 'password')
#Get all swimlane bundles
get_all_bundles = ah.swimbundles.get()
# Get All versions of a swimlane bundle
get_all_versions = ah.swimbundles.get('sw_carbon_black_defense')
# Get One version of a swimlane bundle
get_one_version = ah.swimbundles.get('sw_carbon_black_defense', '1.1.1')
# Clean up get response to return simple data {'<bundle_name>': [<list_of_versions>]}
clean_response(get_all_bundles)
# Search for bundles
srch_by_field = ah.swimbundles.search(fields={'vendor': "Carbon Black"})
srch_by_text = ah.swimbundles.search(text="Carbon Black")
#Download bundle by version
downloaded_bundle = ah.swimbundles.download('sw_carbon_black_defense', '1.1.1')
#Save Latest Download Bundle to disk
save_to_disk('/filepath/carbon_black_defense.zip', downloaded_bundle)
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
apphub-1.3.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for apphub-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3517e97fcd4e9cf06ab718bdf846de823b5b814f333db4ae6fb673d6239e3012 |
|
MD5 | fe16313c8826898608b081bee667eb5d |
|
BLAKE2b-256 | 2ccc26903f190ce051dfb6ceb3ae68f3763025cf281a6003a3da868f65ceb12a |