odbm
====

Installation
------------

    $  pip install odbm

Usage
-----
    
    >>> class Test(Model):
    ...     __db_type__ = 'dict'
    ...     foo = DateProperty(primary_key=True)
    ...     bar = Property(default=[])
    ...     baz = UnicodeProperty(key='d')
    ...     created = DateTimeProperty(key='c')
    
    >>> Test(
    ...     foo=date(2000, 01, 02),
    ...     bar=[1, 2], baz=u'ыыы',
    ...     created=datetime.now()
    ... ).save()
    >>> Test(foo=date(1999, 02, 02), created=datetime.now()).save()
    
    >>> Test.get(date(2000, 01, 02)).bar
    [1, 2]
    
    >>> Test.count()
    2
    
    >>> Test.count(lambda x: x.baz == u'ыыы')
    1
    
    >>> [t.foo.year for t in Test.find(
    ...     filter  = lambda x: 3 not in x.bar,
    ...     order   = lambda x: x.foo.year)]
    [1999, 2000]
    
    >>> Test.find_one().delete()
    >>> Test.count()
    1
