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.

Metadata

Release files for pxcloud 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pxcloud 0.2.0
File Size Uploaded
pxcloud-0.2.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pxcloud 0.2.0
File Interpreter ABI Platform
pxcloud-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / pxcloud-0.2.0.tar.gz

Download URL pxcloud-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e8f433dcb75a7e6571c69829429789405a99512210c50dcaf6122beaa6788eb5
BLAKE2b-256 checksum
How to use checksums
0dfaa60cdc8beecdb116e9974669ffc9b7e6a57338d93f75bca1fa50310e1798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release files / pxcloud-0.2.0-py3-none-any.whl

Download URL pxcloud-0.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26578f41154230befa602bd4764f3fb2f589086cacadd94af28cc235d1e4cf99
BLAKE2b-256 checksum
How to use checksums
0fcdb60ed3ad135c9fa10d72790a374609b9a033af1191d3d211bd11dd8f28de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release 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