appconnect (Python SDK)
Python client for the AppConnectHQ unified connector
platform. Mirrors @appconnecthq/sdk (the TypeScript SDK in ../typescript) 1:1:
same endpoints, same request/response shapes, one error type.
Install
pip install appconnect
# or, from a checkout of this repo:
uv pip install -e python
Usage
import asyncio
import os
from appconnect import AppConnectClient
async def main() -> None:
async with AppConnectClient(
base_url=os.environ["PRODUCTION_API_ORIGIN"],
client_id="your_client_id",
client_secret="your_client_secret",
) as client:
link = await client.create_link_token(
user_id="user_123",
redirect_uri="https://yourapp.com/callback",
)
print(link.link_url)
tools = await client.list_tools(access_token="apphq_...")
result = await client.execute_tool(
access_token="apphq_...",
tool="google_calendar_list_events",
params={"calendarId": "primary"},
)
print(result.data)
asyncio.run(main())
A synchronous twin is available for non-async callers:
from appconnect import SyncAppConnectClient
with SyncAppConnectClient(
base_url=os.environ["PRODUCTION_API_ORIGIN"],
client_id="your_client_id",
client_secret="your_client_secret",
) as client:
tools = client.list_tools(access_token="apphq_...")
base_url / client_id / client_secret can also be supplied via the
APPCONNECT_BASE_URL / APPCONNECT_CLIENT_ID / APPCONNECT_CLIENT_SECRET
environment variables instead of constructor arguments.
Errors
Every failure -- HTTP error responses, {"success": false} API payloads, and
network-level errors -- raises a single appconnect.AppConnectError with
.status (0 for client-side/network failures) and an optional .code.
Framework adapters
appconnect.framework maps AppConnect tools to framework-native shapes and
wires execution back through execute_tool. openai/anthropic need no extra
runtime dependency (pip install appconnect is enough); langchain needs
the langchain extra (pip install appconnect[langchain]).
from appconnect import AppConnectClient
from appconnect.framework.openai import execute_openai_tool_call, to_openai_tools
async with AppConnectClient(...) as client:
tools = await to_openai_tools(client, access_token="apphq_...")
# pass `tools` to your OpenAI chat-completions call's `tools=` param;
# for each returned tool_call, append the assistant message it produced:
message = await execute_openai_tool_call(client, "apphq_...", tool_call)
appconnect.framework.anthropic mirrors this with to_anthropic_tools /
execute_anthropic_tool_use (Anthropic's input_schema +
tool_use/tool_result shapes). appconnect.framework.langchain's
to_langchain_tools builds real langchain_core.tools.StructuredTool
instances (a dynamic Pydantic model enforces each tool's JSON Schema at
runtime) -- raises a helpful ImportError if langchain-core isn't
installed.
Development
cd python
uv venv
uv pip install -e ".[dev]"
uv run pytest
uv run ruff check .
uv run mypy src
dev includes langchain-core so the full test suite (including
tests/test_framework_langchain.py) runs from a plain .[dev] install.
Metadata
Release files for appconnect 0.1.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 | |
|---|---|---|---|---|
| appconnect-0.1.0.tar.gz | 13.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| appconnect-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.9 kB
Release files / appconnect-0.1.0.tar.gz
| Download URL | appconnect-0.1.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
452307aa083e993fc02f7f0777a55e32f395f06613a1f10d736b734878ecfc8e
|
|
BLAKE2b-256 checksum How to use checksums |
69296a642e1f64b19005fe2a2023ee838247bf704ba825a3d308a54a0c4a2c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|
Release files / appconnect-0.1.0-py3-none-any.whl
| Download URL | appconnect-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1493b9cea0ffc9de449343753d33765b19ac9614167b1aba5833ebafc5fad85a
|
|
BLAKE2b-256 checksum How to use checksums |
3e408032c389badf0811759491a48a109ba303bb794d60df72608d8826f75977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|
Security for appconnect 0.1.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.