Skip to main content

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

Download files

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

Source Distribution

parallelworks_client-7.86.0.tar.gz (573.2 kB view details)

Uploaded Source

Built Distribution

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

parallelworks_client-7.86.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file parallelworks_client-7.86.0.tar.gz.

File metadata

  • Download URL: parallelworks_client-7.86.0.tar.gz
  • Upload date:
  • Size: 573.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for parallelworks_client-7.86.0.tar.gz
Algorithm Hash digest
SHA256 292f65fca91104163af7e48e11dcfdd45df64c30eb273548630bce441d581239
MD5 0cdc7f9dc4244a7c167840abdae674d1
BLAKE2b-256 b9b3d40de8fb8b01bcacc5878eb279a1a989cc420182072cf631340fe501661a

See more details on using hashes here.

File details

Details for the file parallelworks_client-7.86.0-py3-none-any.whl.

File metadata

  • Download URL: parallelworks_client-7.86.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for parallelworks_client-7.86.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d2d5d25e88d972807f677deefeaf4b56caf420f391abc420b347177dd77070a
MD5 be81c8faa6c4256ed7b5307ee3242152
BLAKE2b-256 ca292eb77f53b9f2d9ff8c8c25607d4a94bfb33f0177c54a91056e6c8beddba9

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

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