Package duplicity :: Module backend
[hide private]
[frames] | no frames]

Module backend

source code

Provides a common interface to all backends and certain sevices intended to be used by the backends themselves.

Classes [hide private]
  ParsedUrl
Parse the given URL as a duplicity backend URL.
  Backend
Represents a generic duplicity backend, capable of storing and retrieving files.
Functions [hide private]
void
import_backends()
Import files in the duplicity/backends directory where the filename ends in 'backend.py' and ignore the rest.
source code
 
force_backend(backend)
Forces the use of a particular backend, regardless of schema
source code
 
register_backend(scheme, backend_factory)
Register a given backend factory responsible for URL:s with the given scheme.
source code
 
is_backend_url(url_string)
@return Whether the given string looks like a backend URL.
source code
 
get_backend(url_string)
Instantiate a backend suitable for the given URL, or return None if the given string looks like a local path rather than a URL.
source code
 
_ensure_urlparser_initialized()
Ensure that the appropriate clobbering of variables in the urlparser module has been done.
source code
 
strip_auth_from_url(parsed_url)
Return a URL from a urlparse object without a username or password.
source code
 
retry(fn) source code
Variables [hide private]
  _forced_backend = None
hash(x)
  _backends = {}
  _urlparser_initialized = False
  _urlparser_initialized_lock = dup_threading.threading_module()...
Function Details [hide private]

import_backends()

source code 

Import files in the duplicity/backends directory where the filename ends in 'backend.py' and ignore the rest.

Returns: void
void

register_backend(scheme, backend_factory)

source code 

Register a given backend factory responsible for URL:s with the given scheme.

The backend must be a callable which, when called with a URL as the single parameter, returns an object implementing the backend protocol (i.e., a subclass of Backend).

Typically the callable will be the Backend subclass itself.

This function is not thread-safe and is intended to be called during module importation or start-up.

get_backend(url_string)

source code 

Instantiate a backend suitable for the given URL, or return None if the given string looks like a local path rather than a URL.

Raise InvalidBackendURL if the URL is not a valid URL.

_ensure_urlparser_initialized()

source code 

Ensure that the appropriate clobbering of variables in the urlparser module has been done. In the future, the need for this clobbering to begin with should preferably be eliminated.


Variables Details [hide private]

_urlparser_initialized_lock

Value:
dup_threading.threading_module().Lock()