{"id":67,"date":"2010-07-06T19:11:26","date_gmt":"2010-07-07T02:11:26","guid":{"rendered":"https:\/\/www.zacwitte.com\/blog\/a-continuous-blocking-python-interface-for-streaming-flickr-photos\/"},"modified":"2010-07-06T19:11:26","modified_gmt":"2010-07-07T02:11:26","slug":"a-continuous-blocking-python-interface-for-streaming-flickr-photos","status":"publish","type":"post","link":"https:\/\/zacwitte.com\/?p=67","title":{"rendered":"A continuous, blocking python interface for streaming Flickr photos"},"content":{"rendered":"<p>As I explained in my last post, Yahoo! claims their Firehose is a real-time streaming API and it&#8217;s not. So to make life a bit easier for app developers I wrote a python wrapper that provides a continuous blocking interface to the Flickr polling API. Effectively it emulates a streaming API by stringing together frequent requests to the flickr.photos.getRecent results. And it&#8217;s dead simple.<\/p>\n<pre>\nimport PyFlickrStreamr\n\nfs = PyFlickrStreamr('your_api_key_here', extras=['date_upload','url_m'])\nfor row in fs:\n    print str(row['id'])+\"   \"+row['url_m']\n<\/pre>\n<p>You can download the package from <a href=\"http:\/\/packages.python.org\/PyFlickrStreamr\" target=\"_blank\" rel=\"noopener\">pypi<\/a> or fork the source code on <a href=\"http:\/\/github.com\/zacwitte\/PyFlickrStreamr\" target=\"_blank\" rel=\"noopener\">github<\/a>. Have fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I explained in my last post, Yahoo! claims their Firehose is a real-time streaming API and it&#8217;s not. So to make life a bit easier for app developers I wrote a python wrapper that provides a continuous blocking interface to the Flickr polling API. Effectively it emulates a streaming API by stringing together frequent [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/zacwitte.com\/index.php?rest_route=\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zacwitte.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zacwitte.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zacwitte.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zacwitte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=67"}],"version-history":[{"count":0,"href":"https:\/\/zacwitte.com\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"https:\/\/zacwitte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zacwitte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zacwitte.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}