duplicity.backends.onedrivebackend module

class duplicity.backends.onedrivebackend.DefaultOAuth2Session(api_uri)[source]

Bases: OneDriveOAuth2Session

A possibly-interactive console session using a built-in API key

CLIENT_ID = '1612f841-ae01-46ab-9535-43ba6ec04029'
OAUTH_AUTHORIZE_URI = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize'
OAUTH_REDIRECT_URI = 'https://login.microsoftonline.com/common/oauth2/nativeclient'
OAUTH_SCOPE = ['Files.Read', 'Files.ReadWrite', 'Files.Read.All', 'Files.ReadWrite.All', 'User.Read', 'offline_access']
OAUTH_TOKEN_PATH = '/home/docs/.duplicity_onedrive_oauthtoken.json'
__init__(api_uri)[source]
token_updater(token)[source]
class duplicity.backends.onedrivebackend.ExternalOAuth2Session(client_id, refresh_token)[source]

Bases: OneDriveOAuth2Session

Caller is managing tokens and provides an active refresh token.

__init__(client_id, refresh_token)[source]
class duplicity.backends.onedrivebackend.OneDriveBackend(parsed_url)[source]

Bases: Backend

Uses Microsoft OneDrive (formerly SkyDrive) for backups.

API_URI = 'https://graph.microsoft.com/v1.0/'
REQUIRED_FRAGMENT_SIZE_MULTIPLE = 327680
__init__(parsed_url)[source]
_delete(remote_filename)[source]
_get(remote_filename, local_path)[source]
_list()[source]
_put(source_path, remote_filename)[source]
_query(remote_filename)[source]
_retry_cleanup()[source]
initialize_oauth2_session()[source]
class duplicity.backends.onedrivebackend.OneDriveOAuth2Session[source]

Bases: object

A tiny wrapper for OAuth2Session that handles some OneDrive details.

OAUTH_TOKEN_URI = 'https://login.microsoftonline.com/common/oauth2/v2.0/token'
__init__()[source]
delete(*args, **kwargs)[source]
get(*args, **kwargs)[source]
post(*args, **kwargs)[source]
put(*args, **kwargs)[source]