[Python-Dev] davlib.py

Greg Stein gstein@lyra.org
Thu, 17 Feb 2000 00:18:57 -0800 (PST)


On Wed, 16 Feb 2000, Fred L. Drake, Jr. wrote:
> Greg Stein writes:
>  > One more module for consideration... My DAV client module has been around
>  > for a while, has been used in several contexts, and seems to do its job
>  > quite fine. However, I'm a bit concerned that it will see continued
>  > development over the next year as more WebDAV specs become finalized and
>  > turned into RFCs.
> 
>   In spite of Guido's misgivings, I think that if the core RFCs have
> proven effective and useful and the implementation conforms and is
> stable with respect to those, it's a good idea to include it,
> especially as DAV servers really start to show up.

Yes, to all points.

>   My question is with regard to the continued development you mention: 
> Would this change the existing API, or augment & extend it?  Or is it
> too early to say?

Well, things that I'm considering are something like this:

  class DAV(...):

      def get(self, url):
        ...

The above works very well for doing a GET on a resource. But what if the
user wants to set an If: header? Or a If-Modified-Since: header? Or set
some authentication values on the connection?

Stuff like that. I'm thinking that changes would augment/extend the
existing functionality. What is in there right now is great for the simple
cases, so I wouldn't want to lose that. The provided functionality just
doesn't scale up as well to the harder cases as well. It's possible, but
it would look something like:

   hdrs = { 'If' : '(["entity-tag"])' }
   response = connection._request('GET', '/some/url', extra_hdrs=hdrs)

>   If it would change the API, it should wait.

It is possible that it could change in a backwards-incompatible fashion if
we started to load in support for the harder cases. It kind of depends on
whether that extra support would make the simple stuff harder (I hope
not).

>   So, are you working on a "Using WebDAV" book yet, with all the
> interesting client & server availability & configuration info we'd
> actually need to be able to use it?  ;)  *That's* what WebDAV needs -- 
> accessibility!

I've tried my hand at a book. And at writing doc :-). I'm just not very
well cut out for it.  While there isn't a book, the website has a lot of
material and pointers and stuff: http://www.webdav.org/


------------------------

Anyhow... I might suggest adding a simple davlib to the distro. We'd
certainly be well ahead of the other languages :-). It would be nice to
cover the 90% case for people interacting with a DAV server.

And maybe it would help in displacing some of that yucky FTP stuff ;-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/