Metadata-Version: 2.4
Name: pxxl
Version: 0.1.0
Summary: Official Python SDK for Pxxl deploys, CDN assets, domains, and cron jobs.
Project-URL: Homepage, https://pxxl.app
Project-URL: Documentation, https://docs.pxxl.app
Project-URL: Repository, https://github.com/pxxlspace/pxxlspace
Author: Pxxl
License-Expression: MIT
Keywords: cdn,cron,deploy,domains,pxxl,sdk
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Pxxl Python SDK

Official Python client for Pxxl CDN uploads, domain search and DNS management, cron jobs, and source deploys.

```bash
pip install pxxl
```

```python
from pxxl import PxxlClient

client = PxxlClient(api_key="pxxl_...")

asset = client.upload_asset(
    file_path="logo.png",
    visibility="public",
)
print(asset["publicUrl"])
```

## Domains

```python
search = client.search_domains("example.cv")
connected = client.connect_domain("example.com", project_id="proj_123")
records = client.list_domain_dns_records("dom_123")
```

Domain write operations require `scope=domain`, `scope=domains`, or `scope=all` with `permission=read_write`.

## Cron Jobs

```python
job = client.create_cron_job(
    name="cache warmer",
    schedule="*/5 * * * *",
    url="https://example.com/api/warm-cache",
    method="POST",
)
client.trigger_cron_job(job["id"])
```

Cron mutations require `scope=cron`, `scope=cronjobs`, or `scope=all` with `permission=read_write`.

## Deploy

```python
result = client.deploy(
    directory=".",
    name="python-api",
    domain_choice="pxxl.app",
    language="python",
    framework="fastapi",
    start_command="uvicorn main:app --host 0.0.0.0 --port $PORT",
)
print(result["deploymentUrl"])
```
