Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyperf-7.0.4.tar.gz (377.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyperf-7.0.4-py3-none-any.whl (777.7 kB view details)

Uploaded Python 3

File details

Details for the file cyperf-7.0.4.tar.gz.

File metadata

  • Download URL: cyperf-7.0.4.tar.gz
  • Upload date:
  • Size: 377.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for cyperf-7.0.4.tar.gz
Algorithm Hash digest
SHA256 71af8c276f10b45a86e0c7614eed384e6f3b0b6d649766a1db7659a747fdd207
MD5 54a1eb0f6cd1ae19165400732b1ae7d0
BLAKE2b-256 86e14b1163a74ee84483a29879b921c6b0f4b4c1b85baed26ac19174b4d9c332

See more details on using hashes here.

File details

Details for the file cyperf-7.0.4-py3-none-any.whl.

File metadata

  • Download URL: cyperf-7.0.4-py3-none-any.whl
  • Upload date:
  • Size: 777.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for cyperf-7.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6f3b98456c35d23d48644cfcce01eef1d712a2e3c7c941968857b88035f01b9a
MD5 db1e20474f3054e31be2c7aa9ee601d3
BLAKE2b-256 afd54a55123b64176ad5e5a5cfc11b010f5bb1f4af28e027abff82c836d52535

See more details on using hashes here.

Supported by

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