Metadata-Version: 2.4
Name: pxcloud
Version: 0.2.0
Summary: Synchronous and asynchronous Python client for the PX Cloud APIs.
Project-URL: Repository, https://github.com/example/pxcloud
Author: Codex
Author-email: Einar Nilsen-Nygaard <einarnn@cisco.com>
License: MIT License
        
        Copyright (c) 2026 PX Cloud contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.9
Requires-Dist: requests>=2.31
Description-Content-Type: text/markdown

# 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

```bash
python -m pip install pxcloud
```

## Usage

Set `PXCLOUD_TENANT_ID` and `PXCLOUD_API_KEY`. Optionally set
`PXCLOUD_BASE_URL` and `PXCLOUD_TIMEOUT`.

```python
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:

```python
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:

```python
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:

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

Build the wheel and source distribution:

```bash
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.
