AlteryxGalleryAPI is a modern Python client for connecting to the Alteryx Workflow Gallery API. It supports secure authentication, workflow management, and job execution, and is designed for CI/CD and PyPI publishing.
It includes methods that can request Gallery information, send workflow execution commands, monitor job status, and retrieving the desired workflow output.
The official Alteryx API documentation can be found at: https://gallery.alteryx.com/api-docs/
-
Clone the repository
-
Install dependencies using UV:
uv pip install -r requirements.txt
Or, for development:
uv pip install -r requirements.txt -r dev-requirements.txt
-
Configure environment variables:
- Copy
.env.exampleto.envand fill in your credentials:cp .env.example .env # Edit .env and set BASE_URL, API_KEY, API_SECRET, TEST_OWNER_ID
- Copy
-
Run tests:
uv pip install pytest uv run pytest
The following variables must be set in your .env file or your environment:
BASE_URL- The base URL of your Alteryx Gallery (e.g., https://your-gallery-url/webapi/)API_KEY- Your Alteryx API keyAPI_SECRET- Your Alteryx API secretTEST_OWNER_ID- (For tests) The owner ID for test workflows
The client will automatically load these from .env using python-dotenv.
from alteryx_gallery_api.client import AlteryxClient
# Credentials are loaded automatically from .env or environment variables
client = AlteryxClient()
# Or, you can pass credentials directly (overrides .env):
# client = AlteryxClient(base_url="https://your-gallery-url/webapi/", api_key="...", api_secret="...")
# Example: List workflows
workflows = client.get_subscription_workflows()
print(workflows)get_subscription_workflows()— List all workflows in your subscriptionget_workflow_info(workflow_id)— Get details for a workflowpublish_workflow(file_path, name, owner_email, ...)— Publish a new workflowupdate_workflow(workflow_id, file_path, ...)— Update an existing workflowdelete_workflow(workflow_id)— Delete a workflowqueue_job(workflow_id, questions=None, priority=None)— Queue a job for a workflowget_job_status(job_id)— Get the status of a jobget_job_output(job_id, output_id)— Download job output
See the code and docstrings for full details and parameters.