Skip to main content

Official Python SDK for Pxxl deploys, CDN assets, domains, and cron jobs.

Project description

Pxxl Python SDK

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

pip install pxxl
from pxxl import PxxlClient

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

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

Domains

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

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

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"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pxxl-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pxxl-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pxxl-0.1.0.tar.gz.

File metadata

  • Download URL: pxxl-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pxxl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6d91b84fff6f38b915f0e311357c283a35989944458195e1a8f2cab36bd5bcb
MD5 4b07bb1a77714c203dbb9aef2fb6c225
BLAKE2b-256 d1691463df6ce02a57301ad9ff190e5b0f913e9ab58a81f2b6e9e4608406ca46

See more details on using hashes here.

File details

Details for the file pxxl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pxxl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pxxl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2fc65a64e4fc4e57094163853fccf59a05999a42e6f743f3ecc44be86bea9bf
MD5 6de1dd9bf2e6c78fc36135fb551b9c74
BLAKE2b-256 cc14f6fe44b3b3c1dc169c3160ef4168aa03147bc31aa84d462adf7a4049cf8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page