factory
appimage_updater.repositories.factory
¶
Repository factory for creating appropriate repository clients.
This module provides factory functions to create the correct repository client based on URL patterns and repository types using a dynamic registry system.
get_repository_client = get_repository_client_sync
module-attribute
¶
get_repository_client_with_probing_sync = get_repository_client_sync
module-attribute
¶
detect_repository_type(url)
¶
Detect repository type from URL without creating client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
Repository URL |
required |
Returns:
Type | Description |
---|---|
str
|
Repository type string (e.g., 'github', 'gitlab') |
Raises:
Type | Description |
---|---|
RepositoryError
|
If repository type cannot be determined |
Source code in src/appimage_updater/repositories/factory.py
get_repository_client_async(url, timeout=30, user_agent=None, source_type=None, enable_probing=True, **kwargs)
async
¶
Async version of repository client factory.
Source code in src/appimage_updater/repositories/factory.py
get_repository_client_async_impl(url, timeout=30, user_agent=None, source_type=None, enable_probing=True, **kwargs)
async
¶
Get repository client with intelligent domain knowledge and optional probing.
Source code in src/appimage_updater/repositories/factory.py
get_repository_client_sync(url, timeout=30, user_agent=None, source_type=None, enable_probing=True, **kwargs)
¶
Synchronous wrapper for get_repository_client.