Client

Note

This module is still under heavy development!

Client Module

class python_webdav.client.Client(webdav_server_uri, webdav_path='.', port=80, realm='')

This is used for accessing a WebDAV service using similar commands that might be found in a CLI

chdir(directory)

Change directory from whatever current dir is to directory specified

Parameter:directory (String) – Directory to change to
download_file(file_path, dest_path='.')

Download a file from file_path to dest_path

Parameters:
  • file_path (String) – Path to the resource to download
  • dest_path (String) – Path to where the downloaded file should be saved
ls(path='', list_format=('F', 'C', 'M'), separator='t', display=True)
Parameters:
  • path (String) – Path of the directory to list
  • list_format – This is the format for the directory listing
The format symbols are:
  • T - Type (resourcetype)
  • D - Date Time (creationdate)
  • F - Filename (href)
  • M - Last modified time (getlastmodified)
  • A - Attributes (executable)
  • E - ETag (getetag)
  • C - Content type (getcontenttype)
Parameters:
  • separator (String) – Separator to use for formatting output
  • display (Boolean) – Whether or not to print the output
mkdir(path)

Make a directory (collection). If path does not start with ‘/’ it is assumed to be relative to the current working directory.

Parameter:path (String) – Path of the directory to create
pwd()
Return the working directory
set_connection(username='', password='')

Set up the connection object

Parameters:
  • username (String) – Username if authentication is required for the connection
  • password (String) – Password if authentication is required for the connection

Table Of Contents

Previous topic

API

Next topic

Connection

This Page