Introducing Riakkit, An(other) riak python (tiny) framework
mark at basho.com
Fri Dec 16 02:12:20 EST 2011
Thanks, Shuhao. This looks quite useful. And I'm happy to report that
you've landed yourself a spot on the Riak wiki . (Quite the honor,
btw.) Also, great work on the README and docs. Beautiful stuff.
On Thu, Dec 15, 2011 at 6:17 PM, Shuhao Wu <admin at thekks.net> wrote:
> 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.title
> >>> same_user = User.get_with_key(user.key)
> >>> print same_user.posts.title
> 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
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users