Python
Python SDK
Pythonic SDK with async support and type hints.
$pip install appneural
Async/await supportType hints (PEP 561)Pydantic model validationStreaming iteratorsContext manager supportAutomatic pagination
Code
Get started in minutes.
initialization.py
from appneural import AppneuralClient
import os
client = AppneuralClient(
api_key=os.environ["APPNEURAL_API_KEY"],
environment="production",
)authentication.py
# API key authentication
client = AppneuralClient(api_key=os.environ["APPNEURAL_API_KEY"])
# OAuth 2.0
client = AppneuralClient(
oauth=OAuthConfig(
client_id=os.environ["APPNEURAL_CLIENT_ID"],
client_secret=os.environ["APPNEURAL_CLIENT_SECRET"],
scopes=["workflows:read", "workflows:write"],
)
)usage example.py
# Trigger a workflow
run = client.workflows.trigger(
workflow_id="wf_invoice_audit_01",
input={
"documentUrl": "https://storage.example.com/invoices/inv_001.pdf",
"validationRules": ["vat_matching", "vendor_verification"],
},
)
print(f"Workflow started: {run.id}")
print(f"Status: {run.status}")Configuration
SDK options.
| Option | Type | Description |
|---|---|---|
| api_key | str | Your API key |
| environment | str | production | sandbox |
| timeout | int | Request timeout in seconds |
| max_retries | int | Max retry attempts |
Best Practices
Recommended patterns.
Use environment variables for secrets
Leverage async for concurrent operations
Use Pydantic models for input validation
Enable logging with APPNEURAL_LOG_LEVEL
Enterprise Intelligence
Get started with Python SDK.
Pythonic SDK with async support and type hints.
Scope and availability confirmed individually · Written terms define the engagement