{"id":6996,"library":"arcadepy","title":"Arcade Python API Client","description":"The Arcade Python library provides convenient access to the Arcade REST API from any Python 3.8+ application. It includes type definitions for all request parameters and response fields, offering both synchronous and asynchronous clients powered by httpx. The library is frequently updated to reflect the latest API changes.","status":"active","version":"1.10.0","language":"en","source_language":"en","source_url":"https://github.com/ArcadeAI/arcade-py","tags":["API client","REST API","AI tools","asynchronous","API integration"],"install":[{"cmd":"pip install arcadepy","lang":"bash","label":"Install core library"},{"cmd":"pip install arcadepy[aiohttp]","lang":"bash","label":"Install with aiohttp for enhanced async performance"}],"dependencies":[{"reason":"Required Python version","package":"python","version":">=3.8"},{"reason":"Optional HTTP backend for asynchronous client performance","package":"aiohttp","optional":true}],"imports":[{"note":"The main synchronous client class is directly importable from the top-level package.","wrong":"import arcadepy.Arcade","symbol":"Arcade","correct":"from arcadepy import Arcade"},{"note":"The main asynchronous client class is directly importable from the top-level package.","wrong":"import arcadepy.AsyncArcade","symbol":"AsyncArcade","correct":"from arcadepy import AsyncArcade"}],"quickstart":{"code":"import os\nfrom arcadepy import Arcade\n\n# Ensure ARCADE_API_KEY is set in your environment variables\n# e.g., export ARCADE_API_KEY=\"your_api_key_here\"\nclient = Arcade(\n    api_key=os.environ.get(\"ARCADE_API_KEY\", \"\")\n)\n\n# Example: Execute a tool (replace with actual tool_name and input)\ntry:\n    execute_tool_response = client.tools.execute(\n        tool_name=\"Google.Search\",\n        input={\n            \"query\": \"latest news on AI models\"\n        },\n        user_id=\"user@example.com\", # Required for many tools requiring user context\n    )\n    print(f\"Tool execution ID: {execute_tool_response.id}\")\n    print(f\"Tool output: {execute_tool_response.output}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"Initializes the synchronous Arcade client using an API key from environment variables and demonstrates executing a sample tool. Ensure 'ARCADE_API_KEY' is set."},"warnings":[{"fix":"Always use 'arcadepy' for the API client. If you intended the game library, install 'arcade' instead.","message":"Do not confuse 'arcadepy' (API client) with 'arcade' (game development library). They are distinct projects with different purposes and APIs.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `os.environ.get(\"ARCADE_API_KEY\")` for client initialization and avoid embedding credentials.","message":"API keys should be managed securely using environment variables (e.g., ARCADE_API_KEY) or a .env file, rather than hardcoding them directly in your source code.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review changelogs and API documentation for each minor version upgrade, especially if relying on intricate type hints or undocumented internals.","message":"While generally following SemVer, the library may introduce certain backwards-incompatible changes in minor versions, especially concerning static types or internal implementation details not expected to affect most runtime behavior.","severity":"breaking","affected_versions":"All versions (per documentation policy)"},{"fix":"Ensure `AsyncArcade` is imported and `await` is used for async operations. Install `aiohttp` extra and configure client if desired.","message":"For asynchronous usage, import `AsyncArcade` and use `await` with API calls. If using `aiohttp` for improved performance, install `arcadepy[aiohttp]` and explicitly pass `http_client=DefaultAioHttpClient()` to the `AsyncArcade` client.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"This error indicates you've likely confused the 'arcadepy' API client with the 'arcade' game library. For game development, install and import 'arcade'. For API interaction, use the correct 'arcadepy' client methods like `client.tools.execute()`.","cause":"Attempting to use a function from the 'arcade' game development library with the 'arcadepy' API client library.","error":"AttributeError: module 'arcadepy' has no attribute 'open_window'"},{"fix":"Check your internet connection, verify the API endpoint (if manually configured), and ensure there are no firewall rules blocking access to the Arcade API servers.","cause":"The library was unable to establish a network connection to the Arcade API, possibly due to network issues, DNS problems, or incorrect API endpoint configuration.","error":"arcadepy.APIConnectionError: Failed to connect to API"},{"fix":"Verify that your `ARCADE_API_KEY` environment variable is correctly set with a valid, active API key from your Arcade dashboard.","cause":"The provided API key is invalid, expired, or missing, leading to an authentication failure with the Arcade API.","error":"arcadepy.APIStatusError: status_code=401, message='Unauthorized'"},{"fix":"Review the documentation for the specific Arcade tool you are calling and ensure all required parameters are provided with correct data types and formats.","cause":"The request payload (e.g., `tool_name` or `input` parameters for `client.tools.execute`) does not conform to the expected API schema.","error":"arcadepy.APIStatusError: status_code=400, message='Bad Request'"}]}