Skip to content
module

panpath.registry

Registry for path class implementations.

Functions
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 swap
  • path_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