Skip to content
Python client for Yahoo! Meme http://meme.yahoo.com
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
contrib
meme
tests
.gitignore
Makefile
README.textile
examples.py
setup.py

README.textile

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 the latest stable release from PyPI by typing:

$ sudo easy_install meme-py

How to use?

Check it out some simple 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 '----------------------------------------------'

Get the most reposted posts from an user:

  from meme import Meme
  meme = Meme.get(name='john')
  posts = meme.most_reposted_posts(media='text', count=2)
  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 'repost_count: %s' % post.repost_count
      print '----------------------------------------------'

How to report bugs

Go to the Issues section and please provide as much detail as you can.

How to contribute

Contributors are very welcome :) Go ahead and fork the project here on Github and “request pull” when you are done.

Please try to follow PEP-8 rules and include unit tests!

Contributors

Mailing list and further questions

If you want to contribute and still have some questions or if you are still having trouble using meme-py, join the meme-dev group at Yahoo! Groups where you will find other developers that use Yahoo! Meme and APIs for many programming languages.

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:

Something went wrong with that request. Please try again.