Getting Started with FluidDB

This post describes the exact steps I took to get started with FluidDB. It describes how to

  • Get a login and password
  • Get the libraries to allow you to use it from python 2.5
  • Get the FluidDB object ID corresponding to a FluidDB username
  • Create a new object in FluidDB
  • Retrieve that object

What I had to do

  1. Get a username and password. I got my username as a consequence of following @fluiddb on twitter, and the password was sent to me this morning. If you haven’t already reserved a username this way, you can reserve one instead by signing up at

  2. I started using the very simple but useful python library fluiddb put together by Sanghyeon Seo and augmented by Nicholas Tollervey, who gives some nice examples of its use on his blog. (I found bitbucket a bit confusing, but you can get the actual source from, gzipped, from or as a zip or bz2 by changing the extension.)

  3. I found that I needed install a couple of libraries to use with Python 2.5. These were httplib2, available from and simplejson, available from I then tried tollervey’s examples, which all worked fine, without any credentials for FluidDB. So far so good.

  4. Then I used the following trivial code to get the ID for the object corresponding to me (njr).

    import fluiddb
    njrID ='GET', '/objects', query='fluiddb/users/username = "njr"')
    print njrID

which produced

$ python
(200, {'ids': ['cde01b2c-68bb-4d41-b25c-3ca49dcec434']})
  1. I then wanted to try creating an object, which does require credentials. For this, I created the following trivial credentials class (

    class Credentials:
        def __init__ (self, username, password, id=None):
            self.username = username
            self.password = password
   = id
    njr = Credentials ('njr', 'my-secret-password',

    (Obviously, that isn’t the real password...)

  2. That having worked, it seemed like it was time to create an object and test that I could retrieve it, which I did with the following code (

    import fluiddb, credentials
    import simplejson as json
    fluiddb.login (njr.username, njr.password)
    about_DADGAD = json.dumps ({'about' : 'DADGAD'})
    (status, o) = ('POST', '/objects', about_DADGAD)
    print status, o
    print ('GET', '/objects/' + o['id'], '{"showAbout": true}')

    which produced

    $ python
    201 {'id': 'a984efb2-67d8-4b5c-86d0-267b87832fa4',
    'URI': ''}
    (200, {'about': 'DADGAD', 'tagPaths': ['fluiddb/about']})

Table Of Contents

Previous topic

Like Twitter For Data

Next topic

About Tag

This Page