Skip to main content

WS Python SDK

Project description

Logo License CI [Python 3.7 PyPI

Mend Python SDK

SDK written in Python to simplify access to Mend resources

The SDK contains the following modules:

  • web - Module for accessing Mend Application (reports, administration, etc...).
  • client - UA wrapper layer (download UA, execute scan, read UA output files...).

Supported Operating Systems

  • Linux (Bash): CentOS, Debian, Ubuntu, RedHat
  • Windows (PowerShell): 10, 2012, 2016

How to install package from PyPi

  1. Obtain connection details from WS Application (Home > Admin > Integration).
  2. Install package from Pypi: pip install ws-sdk .

How to build and install package from source (for developers)

  1. Download the code: git clone
  2. Build wheel package python bdist_wheel .
  3. Download wheel from GitHub and install : pip install ws-sdk*.whl .


# Unified (can do both WSApp and WSClient)
from ws_sdk.web import WS
ws = WS(url="WS_URL", user_key="USER_KEY", token="ORG_TOKEN")

# Web (Mend Application)
from import WSApp
ws = WSApp(url="WS_URL", user_key="USER_KEY", token="ORG_TOKEN")
# Get alerts 
all_alerts = ws.get_alerts()
# Get vulnerabilities report in XLSX format
vul_report = ws.get_vulnerability(report=True)
# Get all projects ()
project_list = ws.get_projects()
# Create user in the organization
ws.create_user(name='USER_TEST1', email="USER_TEST1@EMAIL.COM", inviter_email="INVITER@EMAIL.COM")

# Client (Mend Unified Agent)
from ws_sdk.client import WSClient

ws_client = WSClient(url="WS_URL", user_key="USER_KEY", token="ORG_TOKEN", ua_path="/UA/WORKING/DIR")
# Download latest UA jar and conf file
# Execute scan into defined project token
out = ws_client.scan(scan_dir="/PATH/TO/DIR", project_token="PROJ_TOKEN", product_token="PROD_TOKEN")
# Read scan artifact's policy rejection summary 
pol_rej = ws_client.get_policy_rejection_summary()

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 Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

ws_sdk- (49.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page