Registry / crm-productivity / canvas

canvas

JSON →
library0.167.0pypypiunverified

The Canvas Python SDK (pypi package `canvas`, import `canvas_sdk`) allows you to programmatically define and interact with your Canvas instance. It simplifies the process of creating and managing event-driven actions, workflows, and integrations within the Canvas low-code platform. Currently at version 0.132.0, the library maintains a frequent release cadence to support new Canvas features and improvements.

pip install canvas
INSTALL
IMPORT
SIG · CANVAS
C
canvas
crm-productivitypythonv0.167.0
Install
22.5s avg
Import
Disk
387MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.167.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 24.68s
py 3.12
✓ —
✓ 21.33s
py 3.13
✓ —
✓ 21.38s
py 3.9
✕ build_error
✕ build_error
387MB installed
● package 387MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Canvas
from canvas_sdk import Canvas
from canvas_sdk import Canvas

Initializes the Canvas SDK client using an API key from environment variables, and then attempts to fetch existing entities from your Canvas instance. This demonstrates basic connectivity and a read operation with the Canvas platform.

import os from canvas_sdk import Canvas # Ensure CANVAS_API_KEY is set as an environment variable # Example: export CANVAS_API_KEY="your_api_key_here" api_key = os.environ.get("CANVAS_API_KEY", "") if not api_key: print("Warning: CANVAS_API_KEY environment variable not set.") print("Please set it to connect to your Canvas instance.") # In a real application, you might raise an error here. else: try: canvas_client = Canvas(api_key=api_key) print("Canvas client initialized successfully.") # Example: Attempt to retrieve entities from Canvas instance print("Attempting to retrieve entities...") entities_page = canvas_client.get_entities() # This sends an API request print(f"Successfully retrieved {len(entities_page.data)} entities. First 3 names: {[e.name for e in entities_page.data[:3]]}") except Exception as e: print(f"Failed to connect or retrieve entities. Ensure API key is valid and Canvas is reachable. Error: {e}")
Debug
Known issues
gotchaThe PyPI package name is `canvas`, but the main import module is `canvas_sdk`. Importing `from canvas import Canvas` will result in a `ModuleNotFoundError`.
fix
Always import from `canvas_sdk`: `from canvas_sdk import Canvas`.
affects: All versions
breakingThe `api_key` argument for `Canvas()` initialization became mandatory. Older code that initialized `Canvas()` without an API key will now fail.
fix
Ensure `Canvas(api_key="your_key")` is always called with a valid API key. It's recommended to load this from environment variables (e.g., `os.environ.get("CANVAS_API_KEY")`).
affects: <0.50.0 to >=0.50.0
breakingThe `PythonAction` class and decorator were significantly refactored and moved. Code using `from canvas_sdk.actions import PythonAction` or the decorator might break.
fix
For defining actions using a decorator, use `from canvas_sdk.functions import python_action`. For the underlying action classes, refer to `canvas_sdk.actions.Action` and its related types in the latest documentation.
affects: <0.80.0 to >=0.80.0
deprecatedThe `base_url` argument for `Canvas()` client initialization is deprecated and will be removed in future versions. The SDK will automatically infer the correct Canvas platform URL.
fix
Remove the `base_url` argument from your `Canvas` client initialization. If you have a custom Canvas instance URL, consult the documentation for alternative configuration methods.
affects: 0.100.0 and above
Upgrade
Version history
0.167.0latest on PyPI · released Jun 13, 2026
Audit
Dependencies
httpxrequiredPrimary HTTP client for API communication with the Canvas platform.
Agent activity
57 hits · last 30 days
node
46
Amazon
1
OpenAI (training)
1
Resources
canvas — pip install canvas · libregistry