Skip to main content

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%)

cylera-client

A Python client for the Cylera Partner API

Installation

pip install cylera-client

Or with uv:

uv add cylera-client

Usage

from cylera_client import CyleraClient, Organization, Inventory, Utilization, Network, Risk, Threat

client = CyleraClient(
    username="you@example.com",
    password="your-password",
    base_url="https://partner.us1.cylera.com/",
)

Authentication is handled automatically. Tokens are cached and refreshed before expiry.

Organization

organization = Organization(client)

# Get the organization associated with your API credentials
org = organization.get_organization()
# {"organization_id": 17, "name": "Cylera", "internal_name": "cylera"}

# List organizations available to switch into
available = organization.get_available_organizations()

# Switch into a different organization (token is invalidated after switch)
# Note that switch_organization is handled asynchronously
# So, whenever you switch, it is wise to sleep for a few seconds to give
# the back-end time to process the reset request.
organization.switch_organization(available[0]["id"])

# Reset back to your home organization
# Note that reset_organization is handled asynchronously
# So, whenever you reset, it is wise to sleep for a few seconds to give
# the back-end time to process the reset request.
organization.reset_organization()

Inventory

inventory = Inventory(client)

# Get a single device by MAC address
device = inventory.get_device("7f:14:22:72:00:e5")

# List devices with optional filters
devices = inventory.get_devices(
    vendor="Philips",
    device_class="Medical",
    page=0,
    page_size=50,
)

# Get device attributes
attrs = inventory.get_device_attributes("7f:14:22:72:00:e5")

Utilization

utilization = Utilization(client)

procedures = utilization.get_procedures(
    device_uuid="ffc20dfe-4c24-11ec-8a38-5eeeaabea551",
    completed_after="2024/01/01",
    page=0,
    page_size=100,
)

Network

network = Network(client)

subnets = network.get_subnets(vlan=477)

Risk

risk = Risk(client)

# Get vulnerabilities
vulns = risk.get_vulnerabilities(severity="CRITICAL", status="OPEN")

# Get mitigations for a specific CVE
mitigations = risk.get_mitigations(vulnerability="CVE-2017-2852")

Threats

threat = Threat(client)

threats = threat.get_threats(severity="HIGH", status="OPEN", page=0, page_size=50)

Debugging

Set DEBUG=1 to print request details to stderr (authorization headers are redacted):

Download files

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

Source Distribution

cylera_client-1.2.3.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

cylera_client-1.2.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file cylera_client-1.2.3.tar.gz.

File metadata

  • Download URL: cylera_client-1.2.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cylera_client-1.2.3.tar.gz
Algorithm Hash digest
SHA256 8377d482d37bc83502a22b344bba666a94584f0268b1d4908a71c934f558e0ee
MD5 4bfb05f26c4c49be33a29465c7af74e5
BLAKE2b-256 a3be9baae71e1d303293308aca7d115652b4f8a9cb737ed5f833c7967f3e2679

See more details on using hashes here.

File details

Details for the file cylera_client-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: cylera_client-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cylera_client-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95a928d05614fcdd8061df5f3818949e4894bb67c1be360a9385d688f5189001
MD5 8256da796b1209d1934153b64e8f42e1
BLAKE2b-256 ef02d903b9314b706f8ec1f1f968738fef0a8d0468061fec33a7ea529353bb56

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.3.0

1 file

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page