Registry / http-networking / python-alfresco-api

python-alfresco-api

JSON →
library1.1.5pypypi✓ verified 85d ago

Python Client for all Alfresco Content Services REST APIs, built with Pydantic v2 models for robust data validation and serialization, and offering event support. It provides comprehensive coverage of Alfresco's API endpoints through dedicated subclients. The current version is 1.1.5, with frequent updates incorporating new API features and improvements.

pip install python-alfresco-api
INSTALL
IMPORT
SIG · PYTHON-ALFRESCO-AP
P
python-alfresco-api
http-networkingpythonv1.1.5
Install
5.1s avg
Import
Disk
46MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46.4MB
glibc
py 3.103.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.
fix
Review 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.
fix
Double-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.
fix
Upgrade 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
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
python-alfresco-api — pip install python-alfresco-api · libregistry