Instructure DAP Client
raw JSON → 2.2.0 verified Fri May 01 auth: no python
Official Python client for Instructure's Data Access Platform (DAP). Current version 2.2.0, requires Python >=3.11. Provides async and sync access to DAP REST API, with built-in retry and error handling. Released under Apache 2.0.
pip install instructure-dap-client Common errors
error ImportError: No module named 'instructure_dap_client' ↓
cause Package installed as 'instructure-dap-client' but import uses underscores.
fix
Run
pip install instructure-dap-client and use from instructure_dap_client import DAPClient. error TypeError: __init__() got an unexpected keyword argument 'config' ↓
cause Using old constructor pattern from version <2.0.
fix
Use
DAPClient(base_url='...', api_key='...') instead. error instructure_dap_client.exceptions.AuthenticationError: No API key provided ↓
cause Client instantiated without an API key.
fix
Set the
DAP_API_KEY environment variable or pass api_key to DAPClient. Warnings
breaking In version 2.0, the constructor signature changed: `DAPClient(base_url, api_key)` replaced the old `DAPClient(config=...)` pattern. Old code will break. ↓
fix Use `DAPClient(base_url='...', api_key='...')` directly.
breaking The `list_jobs()` method now returns an iterator instead of a list. Calling `len()` on the result will fail. ↓
fix Convert to list first: `list(client.list_jobs())` or iterate directly.
gotcha API key is required for all requests. If not provided, the client will raise an `AuthenticationError`. ↓
fix Always set the `DAP_API_KEY` environment variable or pass `api_key` to the constructor.
Imports
- DAPClient wrong
from dap_client import DAPClientcorrectfrom instructure_dap_client import DAPClient
Quickstart
import os
from instructure_dap_client import DAPClient
client = DAPClient(
base_url=os.environ.get('DAP_BASE_URL', 'https://dap.instructure.com'),
api_key=os.environ.get('DAP_API_KEY', '')
)
# Example: list jobs
jobs = client.list_jobs()
print(jobs)