Swimlane Apphub API 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.6.0.tar.gz
(5.9 kB
view details)
Built Distribution
File details
Details for the file apphub-1.6.0.tar.gz
.
File metadata
- Download URL: apphub-1.6.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.11.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa15fa4ffb56273b78fd165ed3df3f36c6b464db8c41315c38a62ae38a76ac83 |
|
MD5 | a014c28e426728ae8822b652ef294dff |
|
BLAKE2b-256 | 838aa86f16a5e14a22d546d6fbb311ce94348d17c5e23c5d185d55d5d8339669 |
File details
Details for the file apphub-1.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: apphub-1.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.11.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc51dbc77c3b75f3d99d1b6e39964c2f1f5b46ecfe73969132b36fd79cb8609f |
|
MD5 | b7e4d7e48edd01f30abbaacac0329052 |
|
BLAKE2b-256 | 110edb288b925efc3f9fe9cfa7f759b1644569e544510a8cfeda40bf42fcf136 |