parallelworks-client
Official Python client for the Parallel Works ACTIVATE platform API.
Installation
pip install parallelworks-client
Quick Start
The simplest way to create a client - just pass your credential:
import os
from parallelworks_client import Client
# The platform host is automatically extracted from your credential
with Client.from_credential(os.environ["PW_API_KEY"]).sync() as client:
response = client.get("/api/buckets")
for bucket in response.json():
print(f"Bucket: {bucket['name']}")
See the examples directory for complete runnable examples.
Authentication
Automatic Host Detection
API keys (pwt_...) and JWT tokens contain the platform host encoded within them. Use from_credential to automatically extract it:
# API key - host decoded from first segment after pwt_
client = Client.from_credential("pwt_Y2xvdWQucGFyYWxsZWwud29ya3M.xxxxx")
# Connects to: https://cloud.parallel.works
# JWT token - host read from platform_host claim
client = Client.from_credential("eyJhbGci...")
# Connects to the host in the token's platform_host claim
Explicit Host
If you prefer to specify the host explicitly:
# API Key (Basic Auth) - best for long-running integrations
client = Client.with_api_key(
"https://cloud.parallel.works",
"pwt_..."
)
# JWT Token (Bearer) - best for scripts, expires in 24h
client = Client.with_token(
"https://cloud.parallel.works",
"eyJhbGci..."
)
# Auto-detect credential type
client = Client.with_credential(
"https://cloud.parallel.works",
os.environ["PW_CREDENTIAL"]
)
Credential Helpers
from parallelworks_client import is_api_key, is_token, extract_platform_host
is_api_key("pwt_abc.xyz") # True
is_token("eyJ.abc.def") # True
extract_platform_host("pwt_...") # "cloud.parallel.works"
Async Support
import asyncio
from parallelworks_client import Client
async def main():
async with Client.from_credential(os.environ["PW_API_KEY"]) as client:
response = await client.get("/api/buckets")
print(response.json())
asyncio.run(main())
Documentation
For full API documentation, visit https://parallelworks.com/docs.
License
MIT
Release files for parallelworks-client 7.92.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parallelworks_client-7.92.0.tar.gz | 607.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parallelworks_client-7.92.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.7 MB
Release files / parallelworks_client-7.92.0.tar.gz
| Download URL | parallelworks_client-7.92.0.tar.gz |
|---|---|
| Size | 607.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6ee874db9a852a87e156e3e5cadcf2299031a8b5e9c68dc21fe69bc9efbae8f
|
|
BLAKE2b-256 checksum How to use checksums |
680a5ce4da3fbdda3900cfec741a2ad09f7183d3df62f15c88ce0700d06ac7ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / parallelworks_client-7.92.0-py3-none-any.whl
| Download URL | parallelworks_client-7.92.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69bc78d5a39dedb69ce1f47b42d2d29ce132d3c1193a8feffe591db02f97a2e1
|
|
BLAKE2b-256 checksum How to use checksums |
ff5013259365816e6b9b6f4c0be98440e8b440bca46de817a4a38ec5452e45ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|