Skip to content

Instantly share code, notes, and snippets.

@insom
Created September 25, 2011 14:56
Show Gist options
  • Select an option

  • Save insom/1240681 to your computer and use it in GitHub Desktop.

Select an option

Save insom/1240681 to your computer and use it in GitHub Desktop.
Tag yourself as having gone to PyConUK 2011
#!/usr/bin/python
import fluidinfo, sys
u, p = sys.argv[1:]
f = fluidinfo.login(u, p)
fluidinfo.call('POST', '/tags/' + u, dict(name='attended',
description='Things that I have been to', indexed=False))
fluidinfo.call('PUT', '/about/pyconuk 2011/' + u + '/attended', '2011-09-24')
print fluidinfo.call('GET', '/about/pyconuk 2011')
# might print something like - ({'status': '200', 'content-length': '116',
# 'content-location': 'https://fluiddb.fluidinfo.com/about/pyconuk%202011',
# 'server': 'nginx/0.7.65', 'connection': 'keep-alive', 'cache-control':
# 'no-cache', 'date': 'Sun, 25 Sep 2011 14:54:11 GMT', 'content-type':
# 'application/json'}, {u'tagPaths': [u'insom/attended', u'ejrowley/attended',
# u'fluiddb/about'], u'id': u'81e4382a-db60-4fb0-a32d-2d4e0e147a32'})
@insom

insom commented Sep 25, 2011

Copy link
Copy Markdown
Author

$ pip install fluidinfo.py
$ python attended-pyconuk.py <yourusername> <yourpassword> # signup at http://www.fluidinfo.com/

@ntoll

ntoll commented Sep 25, 2011

Copy link
Copy Markdown

line 5/6 should be
fluidinfo.call('POST', '/tags/'+u, dict(name='attended', description='Things that I have been to'))

@insom

insom commented Sep 25, 2011

Copy link
Copy Markdown
Author

Fixed! Thanks. This is what happens when you lay into the repl to try and get something working, instead of reading the docs :)

@ntoll

ntoll commented Sep 25, 2011

Copy link
Copy Markdown

Ooops

It should be:

fluidinfo.call('POST', '/tags/'+u, dict(name='attended', description='Things that I have been to', indexed=False))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment