Skip to main content
=== Introduction ===

WebDAV-Kerberos is a Kerberised subclass of the davlib.DAV class found in the
Python_WebDAV_Library package. This module depends on Python_WebDAV_Library
and PyKerberos. Python 3 is not (yet) supported. Installing and configuring
Kerberos properly is left as an exercise for the reader.


=== Dependencies ===

Python_WebDAV_Library (tested with version 0.4.2)

PyKerberos (tested with revision 11110)
https://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk/


=== Usage ===

The interface is exactly the same as davlib.DAV:
http://bazaar.launchpad.net/~datafinder-team/python-webdav-lib/trunk/view/head:/lib/davlib.py

Krb5DAV includes an extra constructor argument and an extra function. Specify
the "principal" constructor argument to set the client user principal name
you wish to connect as. Omitting this argument will cause the Kerberos client
to use the principal of the current user.

The Krb5DAV.whoami() function will return the authenticated user principal
name. If called before authentication the function will return the value
of the "principal" constructor argument, which may be the empty string if
you omitted the argument.


=== Examples ===

from krb5dav import Krb5DAV

# Connect to SharePoint with the credentials of the current user. You must
# have a fresh ticket in your Kerberos credentials cache for this to work.
dav = Krb5DAV('sharepoint.example.com', protocol='http')

response = dav.get('/MySite/Home/Shared%20Documents/foo.docx')
with open('/tmp/foo.docx', 'wb') as outfile:
outfile.write(response.read())
dav.close()

# Connect to SharePoint with specific credentials. You must have a Kerberos
# keytab file with the principal's key, and the current user must have read
# access to it.
dav = Krb5DAV('sharepoint.example.com', protocol='http', principal='jdoe@EXAMPLE.COM')

with open('/tmp/foo.docx', 'rb') as infile:
buf = infile.read()
dav.put('/MySite/Home/Shared%20Documents/foo2.docx', buf)
dav.close()

Release files for WebDAV-Kerberos 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WebDAV-Kerberos 0.2.0
File Size Uploaded
WebDAV-Kerberos-0.2.0.tar.gz 15.1 kB Details

Release files / WebDAV-Kerberos-0.2.0.tar.gz

Download URL WebDAV-Kerberos-0.2.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fed9f11ba3df2c1bcaac1b5a82d069434ca0749d712f3b276d3214fa0e9d1820
BLAKE2b-256 checksum
How to use checksums
6b5825543a9a34fc284564e33cba9e5f9a0fb8cf39546635c90814212b21d02c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page