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, apply_anc_policy_by_mac, and clear_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.2.0.tar.gz (10.4 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.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pxcloud-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e8f433dcb75a7e6571c69829429789405a99512210c50dcaf6122beaa6788eb5
MD5 0e17fa761cce4971bcf53420e4f6bcb4
BLAKE2b-256 0dfaa60cdc8beecdb116e9974669ffc9b7e6a57338d93f75bca1fa50310e1798

See more details on using hashes here.

Provenance

The following attestation bundles were made for pxcloud-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: pxcloud-0.2.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.13

File hashes

Hashes for pxcloud-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26578f41154230befa602bd4764f3fb2f589086cacadd94af28cc235d1e4cf99
MD5 d66fbacfd461a087555e3c0d472daaf7
BLAKE2b-256 0fcdb60ed3ad135c9fa10d72790a374609b9a033af1191d3d211bd11dd8f28de

See more details on using hashes here.

Provenance

The following attestation bundles were made for pxcloud-0.2.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

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

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