CyPerf REST API
Project description
CyPerf REST API
This package is a client API for the Keysight CyPerf Controller.
This is a full implementation of all features supported by CyPerf. It requires a minimum CyPerf version of 6.0.
Getting started
To connect to a controller running at https://my-controller, just run the following:
import cyperf
config = cyperf.Configuration(host="https://my-controller",
username="admin",
refresh_token="get a token from CyPerf UI > Gear > Offline Token")
# if you don't have a valid HTTPS certificate for controller, uncomment this line
# config.verify_ssl = False
client = cyperf.ApiClient(config)
sessions_api = cyperf.SessionsApi(client)
sessions = sessions_api.get_sessions()
sessions[0].config.config.traffic_profiles[0].name = "My API Traffic Profile"
Integrating in a regression
This package also includes a cyperf.utils component that can be used for easily writing scripts
that can be run from a console and receive credentials through environment variables.
Say sample.py contains this code:
import cyperf
client = cyperf.utils.create_api_client_cli(verify_ssl=False)
sessions_api = cyperf.SessionsApi(client)
sessions = sessions_api.get_sessions()
sessions[0].config.config.traffic_profiles[0].name = "My API Traffic Profile"
You can then simply run this script like:
export CYPERF_OFFLINE_TOKEN="get a token from CyPerf UI > Gear > Offline Token"
python sample.py --controller my-controller --user admin
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyperf-26.0.4.tar.gz.
File metadata
- Download URL: cyperf-26.0.4.tar.gz
- Upload date:
- Size: 272.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af71f6ee4ce3df70e0ef0f073648b6bc820323c40d3d8062e71910f0357206d6
|
|
| MD5 |
ef7e11c41fe338070e082cc4934afe5e
|
|
| BLAKE2b-256 |
dc423ef9d984e4d560714fe78e9643b18e542da7d08a7ebbc83f7a9603449073
|
File details
Details for the file cyperf-26.0.4-py3-none-any.whl.
File metadata
- Download URL: cyperf-26.0.4-py3-none-any.whl
- Upload date:
- Size: 799.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680088b339f555e15ac7726f1ec521b3a04927dbc5421dfdd68cc4372c135c71
|
|
| MD5 |
7965f54c43c6742b4a604c32c941bcf6
|
|
| BLAKE2b-256 |
d66b795c444b6f412504d68c6d57beead3fe108da3492d5ff08ea12d09fc4a7e
|