<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Connection — python-webdav v0.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="python-webdav v0.1 documentation" href="index.html" />
<link rel="up" title="API" href="api.html" />
<link rel="next" title="Parse" href="Parse.html" />
<link rel="prev" title="Client" href="Client.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="Parse.html" title="Parse"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Client.html" title="Client"
accesskey="P">previous</a> |</li>
<li><a href="index.html">python-webdav v0.1 documentation</a> »</li>
<li><a href="api.html" accesskey="U">API</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-python_webdav.connection">
<h1>Connection<a class="headerlink" href="#module-python_webdav.connection" title="Permalink to this headline">¶</a></h1>
<p>Connection Module</p>
<dl class="class">
<dt id="python_webdav.connection.Client">
<!--[python_webdav.connection.Client]-->class <tt class="descclassname">python_webdav.connection.</tt><tt class="descname">Client</tt><a class="headerlink" href="#python_webdav.connection.Client" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is for interacting with webdav. Its main purpose is to be
used by the client.py module but may also be used by developers
who wish to use more direct webdav access.</p>
<dl class="method">
<dt id="python_webdav.connection.Client.copy_resource">
<!--[python_webdav.connection.Client.copy_resource]--><tt class="descname">copy_resource</tt><big>(</big><em>connection</em>, <em>resource_path</em>, <em>resource_destination</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.copy_resource" title="Permalink to this definition">¶</a></dt>
<dd>Copy a resource from point a to point b on the server</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.delete_resource">
<!--[python_webdav.connection.Client.delete_resource]--><tt class="descname">delete_resource</tt><big>(</big><em>connection</em>, <em>resource_uri</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.delete_resource" title="Permalink to this definition">¶</a></dt>
<dd>Delete resource</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.get_file">
<!--[python_webdav.connection.Client.get_file]--><tt class="descname">get_file</tt><big>(</big><em>connection</em>, <em>resource_uri</em>, <em>local_file_name</em>, <em>extra_headers={}</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.get_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Download file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.get_lock">
<!--[python_webdav.connection.Client.get_lock]--><tt class="descname">get_lock</tt><big>(</big><em>resource_uri</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.get_lock" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a file lock</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.get_properties">
<!--[python_webdav.connection.Client.get_properties]--><tt class="descname">get_properties</tt><big>(</big><em>connection</em>, <em>resource_uri</em>, <em>properties=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.get_properties" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a list of property objects</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>connection</em> (Object) – Connection Object</li>
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
<li><em>properties</em> (list) – list of property names to get. If left empty, will get all</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Returns a list of resource objects.</p>
</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.get_property">
<!--[python_webdav.connection.Client.get_property]--><tt class="descname">get_property</tt><big>(</big><em>connection</em>, <em>resource_uri</em>, <em>property_name</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.get_property" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a property object</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
<li><em>properties</em> (String) – Property name</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Returns the property value as a string</p>
</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.release_lock">
<!--[python_webdav.connection.Client.release_lock]--><tt class="descname">release_lock</tt><big>(</big><em>resource_uri</em>, <em>lock_object</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.release_lock" title="Permalink to this definition">¶</a></dt>
<dd><p>Release a file lock</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
<li><em>lock_object</em> (Object) – Lock object</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Client.send_file">
<!--[python_webdav.connection.Client.send_file]--><tt class="descname">send_file</tt><big>(</big><em>connection</em>, <em>resource_uri</em>, <em>local_file_path</em>, <em>extra_headers={}</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Client.send_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Send file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>resource_uri</em> (String) – the path of the resource / collection minus the host section</li>
<li><em>local_file_path</em> (String) – the path of the local file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>TODO: Allow the file to be read in smaller blocks and sent using</dt>
<dd>the content range header (if available)</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="python_webdav.connection.Connection">
<!--[python_webdav.connection.Connection]-->class <tt class="descclassname">python_webdav.connection.</tt><tt class="descname">Connection</tt><big>(</big><em>settings</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection" title="Permalink to this definition">¶</a></dt>
<dd><p>Connection object</p>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_copy">
<!--[python_webdav.connection.Connection.send_copy]--><tt class="descname">send_copy</tt><big>(</big><em>path</em>, <em>destination</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_copy" title="Permalink to this definition">¶</a></dt>
<dd>Send a COPY request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_delete">
<!--[python_webdav.connection.Connection.send_delete]--><tt class="descname">send_delete</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_delete" title="Permalink to this definition">¶</a></dt>
<dd>Send a DELETE request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_get">
<!--[python_webdav.connection.Connection.send_get]--><tt class="descname">send_get</tt><big>(</big><em>path</em>, <em>headers={}</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_get" title="Permalink to this definition">¶</a></dt>
<dd>Send a GET request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_lock">
<!--[python_webdav.connection.Connection.send_lock]--><tt class="descname">send_lock</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_lock" title="Permalink to this definition">¶</a></dt>
<dd>Send a LOCK request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_mkcol">
<!--[python_webdav.connection.Connection.send_mkcol]--><tt class="descname">send_mkcol</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_mkcol" title="Permalink to this definition">¶</a></dt>
<dd>Send a MKCOL request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_propfind">
<!--[python_webdav.connection.Connection.send_propfind]--><tt class="descname">send_propfind</tt><big>(</big><em>path</em>, <em>body=''</em>, <em>extra_headers={}</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_propfind" title="Permalink to this definition">¶</a></dt>
<dd>Send a PROPFIND request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_put">
<!--[python_webdav.connection.Connection.send_put]--><tt class="descname">send_put</tt><big>(</big><em>path</em>, <em>body</em>, <em>headers={}</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_put" title="Permalink to this definition">¶</a></dt>
<dd>This PUT request will put data files onto a webdav server.
However, please note that due to the way in which httplib2 sends
files, it is not currently possible to break a file up into chunks
and read it in. In other words, the whole file has to be read into
memory for sending. This could be problematic for large files.</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_rmcol">
<!--[python_webdav.connection.Connection.send_rmcol]--><tt class="descname">send_rmcol</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_rmcol" title="Permalink to this definition">¶</a></dt>
<dd>Send an RMCOL request</dd></dl>
<dl class="method">
<dt id="python_webdav.connection.Connection.send_unlock">
<!--[python_webdav.connection.Connection.send_unlock]--><tt class="descname">send_unlock</tt><big>(</big><em>path</em>, <em>lock_token</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Connection.send_unlock" title="Permalink to this definition">¶</a></dt>
<dd>Send an UNLOCK request</dd></dl>
</dd></dl>
<dl class="class">
<dt id="python_webdav.connection.LockToken">
<!--[python_webdav.connection.LockToken]-->class <tt class="descclassname">python_webdav.connection.</tt><tt class="descname">LockToken</tt><big>(</big><em>lock_token</em><big>)</big><a class="headerlink" href="#python_webdav.connection.LockToken" title="Permalink to this definition">¶</a></dt>
<dd>LockToken object</dd></dl>
<dl class="class">
<dt id="python_webdav.connection.Property">
<!--[python_webdav.connection.Property]-->class <tt class="descclassname">python_webdav.connection.</tt><tt class="descname">Property</tt><a class="headerlink" href="#python_webdav.connection.Property" title="Permalink to this definition">¶</a></dt>
<dd><p>Property object for storing information about WebDAV properties</p>
<dl class="method">
<dt id="python_webdav.connection.Property.set_property">
<!--[python_webdav.connection.Property.set_property]--><tt class="descname">set_property</tt><big>(</big><em>property_name</em>, <em>property_value=None</em><big>)</big><a class="headerlink" href="#python_webdav.connection.Property.set_property" title="Permalink to this definition">¶</a></dt>
<dd>Set property names</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="Client.html" title="previous chapter">Client</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Parse.html" title="next chapter">Parse</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/Connection.txt">Show Source</a></li>
</ul>
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" /> <input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="Parse.html" title="Parse"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Client.html" title="Client"
accesskey="P">previous</a> |</li>
<li><a href="index.html">python-webdav v0.1 documentation</a> »</li>
<li><a href="api.html" accesskey="U">API</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010, scaryclam.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.2.
</div>
</body>
</html>