alteryx-server-py
alteryx-server-py is a modern Python client for the Alteryx Server API with
typed models, OAuth2 authentication, and both synchronous and asynchronous
clients.
It is designed for automation-heavy workflows such as CI/CD deployments, scheduled workflow administration, and server management tasks.
Features
- Sync and async clients backed by
httpx - OAuth2 client credentials authentication
- Typed Pydantic models for V3 API resources
- Workflow publishing, versioning, execution, and polling helpers
- Schedule, user, group, collection, credential, and server resource access
uv-friendly local development and packaging workflow
Install
This repository is currently intended to be used from source.
For local development:
uv sync --dev
For an editable install inside another environment:
uv pip install -e .
Configuration
Copy .env.example to .env and fill in your server details:
cp .env.example .env
Environment variables:
ALTERYX_BASE_URL: Base URL of your server, for examplehttps://server.example.com/webapi/ALTERYX_CLIENT_ID: OAuth2 client IDALTERYX_CLIENT_SECRET: OAuth2 client secretALTERYX_VERIFY_SSL: Optional SSL verification flag, defaults totrueALTERYX_TIMEOUT: Optional request timeout in seconds, defaults to30ALTERYX_MAX_RETRIES: Optional retry count, defaults to3ALTERYX_LOG_LEVEL: Optional log level, defaults toINFO
Official documentation:
- Current Alteryx Server docs:
https://help.alteryx.com/current/en/server/ - Server API overview:
https://help.alteryx.com/current/en/server/api-overview.html - Your server Swagger UI:
https://<server>/webapi/swagger
Quick Start
Synchronous client
from alteryx_server_py import AlteryxClient
client = AlteryxClient.from_env()
workflows = client.workflows.list(page_size=10)
for workflow in workflows:
print(workflow.id, workflow.name)
Asynchronous client
import asyncio
from alteryx_server_py import AsyncAlteryxClient
async def main() -> None:
async with AsyncAlteryxClient.from_env() as client:
jobs = await client.jobs.list(page_size=5)
for job in jobs:
print(job.id, job.status)
asyncio.run(main())
Resource Overview
The sync and async clients expose the same resource layout:
client.workflows: list, get, publish, update, delete, download, questions, versionsclient.jobs: queue jobs, poll until completion, inspect outputs and messagesclient.schedules: create, update, enable, disable, and delete schedulesclient.users: create, update, delete, and inspect user assetsclient.user_groups: create groups and manage membershipclient.collections: manage collections, workflows, and collection permissionsclient.credentials: manage shared credentialsclient.server: retrieve server info and admin settings
Workflow Examples
Publish or update a workflow
from alteryx_server_py import AlteryxClient
client = AlteryxClient.from_env()
existing = client.workflows.list(name="Daily Finance ETL")
if existing:
workflow = client.workflows.update(
workflow_id=existing[0].id,
file_path="dist/DailyFinanceETL.yxzp",
comments="Deploy latest build",
)
else:
workflow = client.workflows.publish(
file_path="dist/DailyFinanceETL.yxzp",
name="Daily Finance ETL",
owner_id="owner-id-from-server",
comments="Initial deployment",
)
print(workflow.id)
Run a workflow and wait for completion
from alteryx_server_py import AlteryxClient
client = AlteryxClient.from_env()
job = client.jobs.run_and_wait(
workflow_id="workflow-id",
questions={"Region": "EMEA", "AsOfDate": "2026-03-18"},
timeout=1800,
poll_interval=10,
)
print(job.status)
for output in job.outputs:
print(output.id, output.name)
Collections, Credentials, and Server Examples
Create a collection and assign permissions
from alteryx_server_py import AlteryxClient
from alteryx_server_py.models import CollectionPermission
client = AlteryxClient.from_env()
collection = client.collections.create("Finance Automation")
client.collections.add_workflow(collection.id, "workflow-id")
client.collections.set_permissions(
collection_id=collection.id,
user_id="user-id",
permissions=CollectionPermission(
is_admin=True,
can_add_assets=True,
can_update_assets=True,
can_remove_assets=False,
can_add_users=True,
can_remove_users=False,
),
)
Create or rotate a shared credential
from alteryx_server_py import AlteryxClient
client = AlteryxClient.from_env()
credential = client.credentials.create(
username=r"CONTOSO\svc-alteryx",
password="super-secret-password",
)
rotated = client.credentials.update(
credential_id=credential.id,
new_password="new-super-secret-password",
)
print(rotated.id)
Inspect server metadata
from alteryx_server_py import AlteryxClient
client = AlteryxClient.from_env()
server_info = client.server.get_info()
server_settings = client.server.get_settings()
print(server_info.model_dump())
print(server_settings.model_dump())
CI/CD Example Scripts
The repository includes example automation scripts under examples/:
examples/deploy_workflows.py: publish a new workflow or update an existing deploymentexamples/promote_workflow.py: upload a new version for an existing workflowexamples/run_workflow_tests.py: execute a workflow and fail fast on unsuccessful jobsexamples/admin_resources.py: inspect server info, collections, and credentials
Example usage:
uv run python examples/deploy_workflows.py \
--package dist/DailyFinanceETL.yxzp \
--name "Daily Finance ETL" \
--owner-id <owner-id>
uv run python examples/promote_workflow.py \
--workflow-id <workflow-id> \
--package dist/DailyFinanceETL.yxzp \
--comments "Promote build 2026.03.18"
uv run python examples/run_workflow_tests.py \
--workflow-id <workflow-id> \
--question Region=EMEA \
--question AsOfDate=2026-03-18
Development
For the VS Code dev container, rebuild the container after changes to
.devcontainer/Dockerfile so bundled tooling such as the GitHub CLI and SSH
client utilities are installed into the image. Once rebuilt, verify the tools
you need and authenticate as needed:
gh --version
ssh -V
ssh-keygen -Y find-principals -h >/dev/null 2>&1 || true
gh auth login
The bundled SSH client is intended for workflows such as SSH-backed Git commit signing from the dev container when your host SSH agent is forwarded into the container.
Run the test suite:
uv run pytest
Run only the live smoke suite against a real server:
uv run pytest tests/integration -m "live and not destructive"
Run the full live integration suite against a sandbox server:
uv run pytest tests/integration -m live
Live integration test environment variables:
ALTERYX_BASE_URL,ALTERYX_CLIENT_ID,ALTERYX_CLIENT_SECRET: required for all live testsALTERYX_TEST_OWNER_ID: required for publish, run, and delete testsALTERYX_TEST_WORKFLOW_ID: optional workflow ID for smoke read verificationALTERYX_TEST_JOB_TIMEOUT,ALTERYX_TEST_POLL_INTERVAL: optional run-and-wait tuning
Run linting:
uv run ruff check src tests examples
Migration Notes
This repository has moved from the legacy alteryx_gallery_api package surface to
alteryx_server_py.
Key changes:
- Package import changed from
alteryx_gallery_apitoalteryx_server_py - Auth variables changed from
BASE_URL,API_KEY, andAPI_SECRETtoALTERYX_BASE_URL,ALTERYX_CLIENT_ID, andALTERYX_CLIENT_SECRET - Resource access is now grouped under the client, for example
client.workflows.list()instead ofget_subscription_workflows() - Job execution uses
client.jobs.run()orclient.jobs.run_and_wait()instead of legacy queue helpers - Sync and async clients now share the same model and resource structure
Status
Phase 1 through Phase 4 are implemented. Phase 5 is focused on documentation, release automation, and packaging polish.
Metadata
Release files for alteryx-server-py 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| alteryx_server_py-0.2.0.tar.gz | 30.2 kB | Without provenance | Details for alteryx_server_py-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alteryx_server_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for alteryx_server_py-0.2.0-py3-none-any.whl |
Total release size: 78.7 kB
Release files / alteryx_server_py-0.2.0.tar.gz
| Download URL | alteryx_server_py-0.2.0.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af3b7403f9bae2382ef68cc886c29e752cc59feaaddc86cc33cf1b356dc73c97
|
|
BLAKE2b-256 checksum How to use checksums |
fc54490cf6c9e393ffe1686ba1ec961b28e373c89463fa9cf0b3f20613fdc06d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / alteryx_server_py-0.2.0-py3-none-any.whl
| Download URL | alteryx_server_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 48.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a6425b8c2277fa66a267ad7332877ce72508982f82b6babfd06f2b2bfebe4de
|
|
BLAKE2b-256 checksum How to use checksums |
29141bbf0cd866c09bf8b0eecbd19ef9014f5e64301b9b819300056ccca4831a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for alteryx-server-py 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.