Skip to content

bgyss/traildb-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python bindings for TrailDB

Quick start

First install the TrailDB library. Then

$ python setup.py install

For detailed instructions, see Getting Started guide.

Example

See TrailDB tutorial for more information.

>>> from traildb import TrailDB, TrailDBConstructor

>>> cookie = '12345678123456781234567812345678'
>>> cons = TrailDBConstructor('test.tdb', ['field1', 'field2'])
>>> cons.add(cookie, 123, ['a'])
>>> cons.add(cookie, 124, ['b', 'c'])
>>> tdb = cons.finalize()

>>> for cookie, trail in tdb.trails():
...     for event in trail:
...         print cookie, event

12345678123456781234567812345678 event(time=123L, field1='a', field2='')
12345678123456781234567812345678 event(time=124L, field1='b', field2='c')

About

Python bindings for TrailDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published