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.1.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.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pxcloud-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9d609084e671c0593e4d047461cc1ababbc2b5786d4c1a55023b52a313c531b1
MD5 5c2c38d640515d3928c271e107015f29
BLAKE2b-256 9d17ddc5e1eaba63893929668433a1b0ef197a0767a4b213df665d7459ecb3b0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pxcloud-0.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 471f7c01f485f4f107c355eec6a89dcde0d637a4753888910e1c30c023d6c449
MD5 0e1edd77bcf48a31d833f29a5544caa0
BLAKE2b-256 19bf48fa997b1e267da334767c7eabd9954f44e6c5ca155dc93acee241f493e3

See more details on using hashes here.

Provenance

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

This release

0.1.1 This release

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