Python SDK for the Deployzy deploy & tunnel platform
Project description
deployzy
Official Python SDK for Deployzy — deploy & tunnel platform.
Install
pip install deployzy
Quick Start
import asyncio
from deployzy import Deployzy
async def main():
async with Deployzy(authtoken="sm_live_...") as client:
# List active tunnels
tunnels = await client.tunnels.list()
print(tunnels)
# Get captured requests
requests = await client.inspect.list(tunnels[0].url)
for req in requests:
print(f"{req.method} {req.path} -> {req.status_code} ({req.duration_ms}ms)")
asyncio.run(main())
Live Traffic Streaming
async with Deployzy(authtoken="sm_live_...") as client:
async for req in client.inspect.subscribe("https://abc123.deployzy.com"):
print(f"{req.method} {req.path} -> {req.status_code}")
API Keys
async with Deployzy(authtoken="sm_live_...") as client:
# List keys
keys = await client.api_keys.list()
# Create a new key
full_token, info = await client.api_keys.create("my-app")
print(full_token) # sm_live_... (save this!)
# Delete a key
await client.api_keys.delete(info.id)
Custom Domains
async with Deployzy(authtoken="sm_live_...") as client:
# Add a domain
domain, instructions = await client.domains.create("api.example.com")
print(f"Add CNAME: {instructions['name']} -> {instructions['target']}")
# Verify DNS
result = await client.domains.verify(domain.id)
print(result)
# List domains
domains = await client.domains.list()
Error Handling
from deployzy import Deployzy, AuthError, RateLimitError, ApiError
try:
async with Deployzy(authtoken="invalid") as client:
await client.tunnels.list()
except AuthError:
print("Bad token")
except RateLimitError as e:
print(f"Rate limited, retry in {e.retry_after}s")
except ApiError as e:
print(f"API error {e.status_code}: {e}")
Self-Hosted
client = Deployzy(
authtoken="sm_live_...",
server_url="https://tunnel.mycompany.com",
)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deployzy-1.1.2.tar.gz.
File metadata
- Download URL: deployzy-1.1.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e23f1679208bb06815f51a7d9a956b5eccdd06ae746ec4b8e4f42915b144450a
|
|
| MD5 |
37b95ec006ca70fef662418fce34ffa8
|
|
| BLAKE2b-256 |
ec3a63baeb2b1b208c2e87a172edf31cd581fe60c7fa3ed0bda55cf1ff98df02
|
Provenance
The following attestation bundles were made for deployzy-1.1.2.tar.gz:
Publisher:
release.yml on jams24/deployzy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deployzy-1.1.2.tar.gz -
Subject digest:
e23f1679208bb06815f51a7d9a956b5eccdd06ae746ec4b8e4f42915b144450a - Sigstore transparency entry: 2035674580
- Sigstore integration time:
-
Permalink:
jams24/deployzy@3f12415c588f6ec064f3354a0a3ee3f467293bd5 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/jams24
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f12415c588f6ec064f3354a0a3ee3f467293bd5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file deployzy-1.1.2-py3-none-any.whl.
File metadata
- Download URL: deployzy-1.1.2-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.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e91bf68ad10052a3ed4a8bc45c70deae69341f8574a16702709236a1d4600df4
|
|
| MD5 |
22bccad0e6fe58502bee1ed9717237c1
|
|
| BLAKE2b-256 |
00149045b7637ca09c441fff900f335c59f905815ceefed8bf5fbee129353df5
|
Provenance
The following attestation bundles were made for deployzy-1.1.2-py3-none-any.whl:
Publisher:
release.yml on jams24/deployzy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deployzy-1.1.2-py3-none-any.whl -
Subject digest:
e91bf68ad10052a3ed4a8bc45c70deae69341f8574a16702709236a1d4600df4 - Sigstore transparency entry: 2035674897
- Sigstore integration time:
-
Permalink:
jams24/deployzy@3f12415c588f6ec064f3354a0a3ee3f467293bd5 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/jams24
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f12415c588f6ec064f3354a0a3ee3f467293bd5 -
Trigger Event:
push
-
Statement type: