Skip to main content

pxcloud

pxcloud is a Python client for PX Cloud HTTP APIs. It currently exposes list_devices, find_device_by_name, get_sessions, get_sgts, and apply_anc_policy_by_mac through Requests-based synchronous and aiohttp-based asynchronous clients.

Installation

python -m pip install pxcloud

Usage

Set PXCLOUD_TENANT_ID and PXCLOUD_API_KEY. Optionally set PXCLOUD_BASE_URL and PXCLOUD_TIMEOUT.

from pxcloud import ClientConfig, PxCloudClient

with PxCloudClient(ClientConfig.from_env()) as client:
    sessions = client.get_sessions("device-id")

The async client has the same API:

from pxcloud import AsyncPxCloudClient, ClientConfig

async with AsyncPxCloudClient(ClientConfig.from_env()) as client:
    sessions = await client.get_sessions("device-id")

Enable HTTP request/response logging with standard Python logging:

import logging
logging.basicConfig(level=logging.DEBUG)

API keys are redacted from logged headers. Response bodies are logged at DEBUG.

Development

Run the same test command used by CI:

python -m pip install --upgrade pip hatch
hatch run test

Build the wheel and source distribution:

hatch build

Versions come from Git tags such as v0.1.0 via hatch-vcs. GitHub Actions tests Python 3.10–3.14, builds distributions, and publishes to PyPI for v* tags using PyPI Trusted Publishing.

Download files

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

Source Distribution

pxcloud-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

pxcloud-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pxcloud-0.1.0.tar.gz.

File metadata

  • Download URL: pxcloud-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pxcloud-0.1.0.tar.gz
Algorithm Hash digest
SHA256 843ea266f03c2c50f932576939b93b84a367c6ad3d5b24ee438d9a73a014e452
MD5 a388a2358f3c45af4a317162874625d7
BLAKE2b-256 374f84b22d7707f4e98591290a5764a6414364f8714564f964a0818e599cd243

See more details on using hashes here.

Provenance

The following attestation bundles were made for pxcloud-0.1.0.tar.gz:

Publisher: ci.yml on CiscoISE/py-pxcloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pxcloud-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pxcloud-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pxcloud-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05f4f861d5785085b645dc91858926472c57454b137538ee98a361e293852ead
MD5 1df61752a2a62e25304597b07d3cecef
BLAKE2b-256 d49abd46319cd12b33881ccbd751928d52a935eacbc9be6d5d98424bf9b26f34

See more details on using hashes here.

Provenance

The following attestation bundles were made for pxcloud-0.1.0-py3-none-any.whl:

Publisher: ci.yml on CiscoISE/py-pxcloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

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