Skip to main content

Questra Automation Python Package

Project description

seven2one-questra-automation

Type-safe Python client for the Questra Automation GraphQL API.

Features

  • Type-safe: All GraphQL types, queries, and mutations are fully typed with Python dataclasses
  • Authentication: Integrates with questra-authentication for seamless authentication
  • Comprehensive: Supports all Automation API operations (workspaces, repositories, schedules, executions)
  • Modern: Uses latest Python 3.10+ features (native type hints, dataclasses)
  • Well-documented: Extensive docstrings

Installation

Using uv (recommended):

uv add seven2one-questra-automation

Using pip:

pip install seven2one-questra-automation

Requirements

  • Python >= 3.10
  • seven2one-questra-authentication >= 0.2.1
  • gql[all] >= 3.5.0

Setup

Basic Client Initialization

from seven2one.questra.authentication import QuestraAuthentication
from seven2one.questra.automation import QuestraAutomation

# Create authentication client
auth_client = QuestraAuthentication(
    url="https://authentik.dev.example.com",
    username="ServiceUser",
    password="secret_password",
    oidc_discovery_paths=["/application/o/automation"],
)

# Initialize Automation client
client = QuestraAutomation(
    graphql_url="https://automation.dev.example.com/graphql",
    auth_client=auth_client,
)

Available API Groups

The client provides access to API operations through namespaces:

  • client.queries: GraphQL queries (get_workspaces, get_executions, get_service_info, etc.)
  • client.mutations: GraphQL mutations (create_workspace, execute_automation, create_schedule, etc.)
  • client.execute_raw(query): Execute custom GraphQL queries

Available Models

Enums

  • ExecutionInitiator: MANUAL, SCRIPT, SCHEDULE
  • RepositoryAuthenticationMethod: USERNAME_PASSWORD, SSH_KEY
  • AutomationBuildStatus: PENDING, RUNNING, FAILED, SUCCEEDED
  • AutomationExecutionStatus: PENDING, RUNNING, SUCCEEDED, FAILED
  • AutomationExecutionDomainStatus: SUCCEEDED, FAILED
  • SortEnumType: ASC, DESC

Types

  • WorkspaceView: Workspace details
  • AutomationView: Automation details
  • AutomationExecutionView: Execution details
  • RepositoryView: Repository details
  • ScheduleView: Schedule details
  • ScheduledExecutionView: Scheduled execution details
  • ServiceInfo: Service information
  • ErrorCodeView: Error code details

Connection Types

All list queries return Connection types with pagination support:

  • AutomationsConnection
  • ExecutionsConnection
  • WorkspacesConnection
  • RepositoriesConnection
  • SchedulesConnection
  • ScheduledExecutionsConnection
  • ErrorCodesConnection

Each Connection provides:

  • page_info: Pagination information
  • edges: List of edges with cursor
  • nodes: Flat list of items
  • total_count: Total count of items

Development

Install development dependencies:

uv sync --all-groups

Run tests:

uv run pytest

Run linting:

uv run ruff check .

Format code:

uv run ruff format .

Schema

The client is based on the GraphQL schema in schema/automation.sdl.

License

Proprietary - Seven2one Informationssysteme GmbH

Project details


Download files

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

Source Distribution

seven2one_questra_automation-0.3.0.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

seven2one_questra_automation-0.3.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file seven2one_questra_automation-0.3.0.tar.gz.

File metadata

  • Download URL: seven2one_questra_automation-0.3.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seven2one_questra_automation-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a773485400a7fd22f43ce6eac12f11caea1fcac46c99667116ecfcb798df65c2
MD5 995b93ac34f05be0e651d8b69f0165dd
BLAKE2b-256 2241f8014b36abb261bcb8b45617c08078839005e84d5bfce723fdd0526e098a

See more details on using hashes here.

File details

Details for the file seven2one_questra_automation-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: seven2one_questra_automation-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seven2one_questra_automation-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ead5d8d4efd98585b7183dd5ee31fe37e0cccfbf1e836016942338e9d3405c6a
MD5 49fb1a604c547546ec496dd1d7e84bcc
BLAKE2b-256 5af243871ef49b7a72d1b2bf9602a94589a87c4b6e593333575b4db78fbb6295

See more details on using hashes here.

Supported by

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