Code Repositories xandikos / 011f83e
Update docs. Jelmer Vernooń≥ 3 years ago
3 changed file(s) with 26 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
4141
4242 Clients that are known not to work:
4343
44 - CAlDAV-Sync
44 - CalDAV-Sync
4545 - CardDAV-Sync
4646
4747 Running
6767 Dependencies
6868 ============
6969
70 At the moment, Dulwich supports Python 3.5 and higher as well as Pypy 3. It
70 At the moment, Xandikos supports Python 3.5 and higher as well as Pypy 3. It
7171 also uses dulwich, icalendar and defusedxml.
0 Some properties need a way to create <href> objects that refer to relative paths:
0 Some properties need a way to create <href> objects that refer to the relative path of the resource.
11
22 addmember
33 calendar-home-set
44 addressbook-home-set
5
6 Access to a create_href() function should be sufficient.
57
68 Some properties need WebDAV server metadata:
79
1719
1820 PUT/DELETE/MKCOL need access to username (for author) and possibly things like user agent
1921 (for better commit message)
22
23
24 class Context(object):
25
26 def create_href(self, href):
27 raise NotImplementedError(self.create_href)
28
29 def get_current_user(self):
30 return (name, principal)
0 Xandikos consists of a couple of layers.
0 Xandikos has a fairly clear distinction between different components.
11
2 The main building blocks are vCard (*.vcf) and ICalendar (*.ics) files. Storage
3 happens in GIT repositories.
2 Modules
3 =======
44
5 All items are identified by a UID, which is unique for the store. Items
6 can have multiple versions, which are identified by an ETag. Each store
7 maps to a single git repository, and can not contain directories. In the future,
8 a store could map to a subtree in a Git repository.
5 The core webdav implementation lives in xandikos.webdav. This just implements
6 the WebDAV protocol, and provides abstract classes for WebDAV resources that can be
7 implemented by other code.
98
10 Stores are responsible for making sure that:
9 Several WebDAV extensions (access, carddav, caldav) live in their own
10 Python file. They build on top of the WebDAV module, and provide extra
11 reporter and property implementations as defined in those specifications.
1112
12 * their contents are validly formed calendars/contacts
13 * UIDs are unique
13 Store is a simple object-store implementation on top of a Git repository, which
14 has several properties that make it useful as a WebDAV backend.
1415
15 The WebDAV server is a thin app that processes DAV requests and then defers to
16 a DAVBackend for the actual implementation.
16 The business logic lives in xandikos.web; it ties together the other modules,
1717
18 The actual web implementation calls out to 'webdav' to start the server, then
19 provides a DAVBackend that - together with xandikos.store and utilities from
20 xandikos.caldav and xandikos.carddav.
21
22 class DAVResource(object):
23
24 ...
25
26
27 class DAVBackend(object):
28
29 def report(self):
30 # TODO
31
32 def get_resource(self, url):
33 # TODO
34
35 def create_collection(self, url):
36 # TODO