ConTree SDK

raw JSON →
0.3.0 verified Mon Apr 27 auth: no python

SDK for ConTree container runtime with versioned filesystem state. Current version 0.3.0, compatible with Python 3.10-3.14. Under active development.

pip install contree-sdk
error ImportError: cannot import name 'ConTreeClient' from 'contree'
cause Old import path used; package was renamed.
fix
Use 'from contree_sdk import ConTreeClient'.
error PermissionError: 403 Forbidden
cause Missing or invalid API key.
fix
Set CONTREE_API_KEY environment variable or pass valid api_key to ConTreeClient.
error TypeError: Client.__init__() got an unexpected keyword argument 'timeout'
cause Client does not accept timeout argument; use environment variable or default.
fix
Remove timeout parameter from ConTreeClient().
breaking Changed from 'contree' package name to 'contree_sdk' in 0.2.0. Old imports will fail.
fix Use 'from contree_sdk import ...' instead of 'from contree import ...'.
deprecated The method 'get_snapshot()' is deprecated in 0.3.0, use 'get_snapshot_async()' for new code.
fix Replace 'client.get_snapshot(...)' with 'await client.get_snapshot_async(...)' in async contexts.
gotcha API key must be set as environment variable CONTREE_API_KEY or passed to constructor. Missing key raises PermissionError.
fix Set environment variable or pass api_key parameter.

Initialize client with API key and list filesystem versions.

from contree_sdk import ConTreeClient

client = ConTreeClient(api_key=os.environ.get('CONTREE_API_KEY', ''))
print(client.list_versions())