Install & Compatibility
Where this runs
tested against v1.1.5 · 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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46.4MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 5.1s · import 0.000s · 47MB
46MB installed
● package 46MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AlfrescoCoreClient
✓ from python_alfresco_api import AlfrescoCoreClient
✗ from alfresco_api.client import AlfrescoClient
AlfrescoAuthClient
✓ from python_alfresco_api import AlfrescoAuthClient
AlfrescoDiscoveryClient
✓ from python_alfresco_api import AlfrescoDiscoveryClient
This quickstart initializes the Alfresco client using environment variables for credentials, then fetches the 'Company Home' node by path and creates a new folder within it. Ensure your Alfresco instance is running and accessible.
import os
from alfresco_api.client import AlfrescoClient
from alfresco_api.model.nodes import NodeBodyCreate
# Configure Alfresco connection via environment variables
ALFRESCO_HOST = os.environ.get('ALFRESCO_HOST', 'http://localhost:8080')
ALFRESCO_USERNAME = os.environ.get('ALFRESCO_USERNAME', 'admin')
ALFRESCO_PASSWORD = os.environ.get('ALFRESCO_PASSWORD', 'admin')
# Initialize the client
try:
client = AlfrescoClient(
host=ALFRESCO_HOST,
username=ALFRESCO_USERNAME,
password=ALFRESCO_PASSWORD
)
# Example: Get the 'Company Home' node by its path (v1.1.5+ feature)
nodes_api = client.nodes
company_home_node = nodes_api.get_node_by_path(relative_path='/Company Home')
print(f"Successfully connected. Company Home Node ID: {company_home_node.entry.id}")
# Example: Create a new folder
new_folder_name = 'MyTestFolder'
folder_create_body = NodeBodyCreate(
name=new_folder_name,
node_type='cm:folder',
properties={'cm:title': 'My Test Folder via Python API'}
)
created_folder = nodes_api.create_node(
node_id=company_home_node.entry.id,
node_body_create=folder_create_body
)
print(f"Created folder '{new_folder_name}' with ID: {created_folder.entry.id}")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingThe client is built on Pydantic v2. If you are migrating from a project using Pydantic v1 or an older version of this client, you may encounter `ValidationError` due to changes in model definitions and validation logic.fixReview the Pydantic model definitions (e.g., `NodeBodyCreate`) and update your data structures to conform to Pydantic v2 standards. Consult Pydantic v2 migration guides if necessary.
affects: All versions >= 1.0.0
gotchaIncorrect Alfresco host, username, or password will lead to authentication failures or connection errors. This is a common setup mistake.fixDouble-check the `ALFRESCO_HOST`, `ALFRESCO_USERNAME`, and `ALFRESCO_PASSWORD` environment variables or the parameters passed directly to the `AlfrescoClient` constructor. Ensure the Alfresco instance is running and network accessible.
affects: All versions
gotchaThe `get_node_by_path` method (using `relative_path`) for efficient node retrieval by path was significantly improved and stabilized in v1.1.5. Older versions might have limited or different behavior.fixUpgrade to `python-alfresco-api` version 1.1.5 or newer to leverage the most robust path-based node retrieval. For older versions, you might need to rely on ID-based lookups or custom queries.
affects: < 1.1.5
Upgrade
Version history
1.1.5latest on PyPI · released Dec 15, 2025
Audit
Dependencies
PydanticrequiredCore data validation and serialization models (requires v2)
requestsrequiredHTTP communication with Alfresco API