-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
41 lines (32 loc) · 1.14 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# DroneStore
### distributed version control for application data
Dronestore is a library that keeps objects and their attributes versioned to
allow merging with different versions of the object at a later date.
Upon merging two object versions, attribute values are selected according to
given rules (e.g. most recent, maximum). Thus, multiple disconnected machines
can modify the same object and sync changes at a later date.
(slides from a talk [here](http://static.juanbb.com/acm.dronestore.pdf))
## Install
sudo python setup.py install
## License
Dronestore is under the MIT License.
## Hello World
>>> import dronestore
>>> from dronestore import StringAttribute
>>> from dronestore.merge import LatestStrategy
>>>
>>> class MyModel(dronestore.Model):
... first = StringAttribute(strategy=LatestStrategy)
... second = StringAttribute(strategy=LatestStrategy)
...
>>> foo = MyModel('FooBar')
>>> foo.first = 'Hello'
>>> foo.commit()
>>>
>>> bar = MyModel('FooBar')
>>> bar.second = 'World'
>>> bar.commit()
>>>
>>> foo.merge(bar)
>>> print foo.first, foo.second
Hello World