Hi guys,

I just created an(other) python framework on top of python-riak at
https://github.com/ultimatebuster/riakkit. It's basically an object
mapper that maps objects to be stored in riak.

Here's a demo:

    >>> class User(Document):
    ...     bucket_name = "users"
    ...     client = some_client
    ...
    ...     SEARCHABLE = True  # Marking this to be searchable.
    ...
    ...     name = types.StringProperty(required=True)
    ...     posts = types.LinkedDocuments()
    >>> user = User(name="mrrow")
    >>> some_post = BlogPost(title="Hello", content="World")
    >>> user.posts = []
    >>> user.posts.append(some_post)
    >>> user.save()
    >>> print user.posts[0].title
    Hello
    >>> same_user = User.get_with_key(user.key)
    >>> print same_user.posts[0].title
    Hello

Of course you can see all of this in the README/tutorial.

The other one (the first one) is riakalchemy
(https://github.com/Linux2Go/riakalchemy). I discovered this about 2
days into the development of riakkit.. (don't get me wrong, it took me
3 days to write this) they're pretty similar, although there are some
differences. Some stuff are inspired by riakalchemy after I saw it,
such as the cls.load function.

Hopefully you'll be able to check out my new project, and the link
again is at: https://github.com/ultimatebuster/riakkit

Cheers,

Shuhao

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to