/meme-py

Python client for Yahoo! Meme

Primary LanguagePython

meme-py

A Python client API to consume Yahoo! Meme’s webservices on YQL.

How to install?

From source:

Download the source code here on Github, unzip/untar the archive, go to the extracted directory and type in the command line:

$ sudo python setup.py install

From PyPI (easiest way):

You can also install from PyPI typing:

$ sudo easy_install meme-py

How to use?

Check it out some simple and cool examples (for more please check examples.py file):

Get popular posts:

  from meme import Meme
  Meme.Posts.popular()

Search posts:

  from meme import Meme
  posts = Meme.Posts.search('meme rocks')
  print '---------- Results for "meme rocks" ----------'
  for post in posts:
      print 'Content: %s' % post.content
      print 'Caption: %s' % post.caption
      print '----------------------------------------------'

Make sure to check these cool Meme search tips!

Get info from a particular Meme:

  from meme import Meme
  meme = Meme.get(name='guilherme_chapiewski')
  print '========== guilherme_chapiewski Meme =========='
  print meme.title
  print meme.description 
  print meme.url

Get people that a Meme follows and it’s followers:

  from meme import Meme
  meme = Meme.get(name='john')
  print meme.following(count=20) # people that "john" is following
  print meme.followers(count=20) # people that follows "john"

Get posts from a particular Meme:

  from meme import Meme
  meme = Meme.get(name='john')
  posts = meme.posts()
  print '---------- Results  ----------'
  for post in posts:
      print 'Type: %s' % post.type
      print 'Repost count: %s' % post.repost_count
      print 'Original: %s' % post.is_original # created by "john" (True) or reposted (False)
      print '----------------------------------------------'

Get the activity (reposts and comments) around a particular post:

  from meme import Meme
  meme = Meme.get(name='john')
  posts = meme.posts()
  latest_post = posts[0]
  print '---------- Results  ----------'
  for post in latest_post.activity():
      print 'Type: %s' % post.type #repost or commment
      print 'Comment: %s' % post.comment
      print 'GUID: %s' % post.guid
      print '----------------------------------------------'

How to report bugs

Go to the Issues section and please provide as much detail as you can in order to help us solve the problem.

How to contribute

This API is on an early stage of development and contributors are very welcome :) Go ahead and fork the project here on Github! I’ll be happy to integrate your updates later, just “request pull” when you are done.

If you have further questions, just drop me a message at guilherme dot chapiewski at gmail dot com, on Meme (/guilherme_chapiewski) or on Twitter (@gchapiewski).

Contributors

What is Meme?

Meme (http://meme.yahoo.com) is a light-blogging tool – which means that it is not as small and simple as Twitter (micro-blogging) and not as big and full-featured as Wordpress (standard blogging) – created by Yahoo! in Brazil.

For more information about Yahoo! Meme please go to: