module
panpath.registry
Registry for path class implementations.
Functions
clear_registry()— Clear the registry (mainly for testing).</>get_path_class(scheme)(Type) — Get the path class for a URI scheme.</>get_registered_schemes()(list) — Get all registered URI schemes.</>register_path_class(scheme,path_class)— Register a path class implementation for a URI scheme.</>restore_registry(snapshot)— Restore the registry from a snapshot (for testing).</>swap_implementation(scheme,path_class)(Type) — Swap implementation for a scheme (for testing with local mocks).</>
function
panpath.registry.register_path_class(scheme, path_class)
Register a path class implementation for a URI scheme.
Parameters
scheme(str) — URI scheme (e.g., 's3', 'gs', 'az')path_class(Type) — Cloud path class (with both sync and async methods)
function
panpath.registry.get_path_class(scheme)
Get the path class for a URI scheme.
Parameters
scheme(str) — URI scheme (e.g., 's3', 'gs', 'az')
Returns (Type)
Path class for the scheme
Raises
KeyError— If scheme is not registered
function
panpath.registry.get_registered_schemes() → list
Get all registered URI schemes.
function
panpath.registry.clear_registry()
Clear the registry (mainly for testing).
function
panpath.registry.swap_implementation(scheme, path_class)
Swap implementation for a scheme (for testing with local mocks).
Parameters
scheme(str) — URI scheme to swappath_class(Type) — New path class
Returns (Type)
Old path class (or None if not previously registered)
function
panpath.registry.restore_registry(snapshot)
Restore the registry from a snapshot (for testing).
Parameters
snapshot(Dict) — Registry snapshot to restore