feedly 0.11.3

Feedly allows you to build complex feed and caching structures using Redis.
Stream Framework (previously Feedly)
------------------------------------

[![Build Status](https://travis-ci.org/tschellenbach/Feedly.png?branch=master)](https://travis-ci.org/tschellenbach/Feedly)

**Note**

This project was previously named Feedly. As requested by feedly.com we have now renamed the project to Stream Framework.


## What can you build? ##

Feedly allows you to build newsfeed and notification systems using Cassandra and/or Redis.
Examples of what you can build are the Facebook newsfeed, your Twitter stream or your Pinterest following page.
We've built Feedly for [Fashiolista] [fashiolista] where it powers the [flat feed] [fashiolista_flat], [aggregated feed] [fashiolista_aggregated] and the [notification system] [fashiolista_notification].
(Feeds are also commonly called: Activity Streams, activity feeds, news streams.)

[fashiolista]: http://www.fashiolista.com/
[stream]: http://getstream.io/
[stream_js]: https://github.com/tschellenbach/stream-js
[stream_python]: https://github.com/tschellenbach/stream-python
[stream_php]: https://github.com/tbarbugli/stream-php
[stream_ruby]: https://github.com/tbarbugli/stream-ruby
[fashiolista_flat]: http://www.fashiolista.com/feed/?feed_type=F
[fashiolista_aggregated]: http://www.fashiolista.com/feed/?feed_type=A
[fashiolista_notification]: http://www.fashiolista.com/my_style/notification/
[example_app_link]: https://github.com/tbarbugli/feedly_pin/

To quickly make you acquainted with Feedly, we've created a Pinterest like example application, you can find it [here] [example_app_link]

## GetStream.io ##

Stream Framework's authors also offer a Saas solution for building feed systems at [getstream.io] [stream]
The hosted service is highly optimized and allows you start building your application immediatly.
It saves you the hastle of maintaining Cassandra, Redis, Faye, RabbitMQ and Celery workers.
Clients are available for [Node] [stream_js], [Ruby] [stream_ruby], [Python] [stream_python] and [PHP] [stream_php]

## Consultancy ##

For Stream Framework and GetStream.io consultancy please contact thierry at getstream.io


**Authors**

 * Thierry Schellenbach (thierry at getstream.io)
 * Tommaso Barbugli (tommaso at getstream.io)
 * Guyon Morée


**Resources**

 * [Documentation] 
 * [Bug Tracker] 
 * [Code] 
 * [Mailing List] 
 * [IRC]  (irc.freenode.net, #feedly-python) 
 * [Travis CI] 
 

**Tutorials**

 * [Pinterest style feed example app] [mellowmorning_example]
 

[mellowmorning_example]: http://www.mellowmorning.com/2013/10/18/scalable-pinterest-tutorial-feedly-redis/
[Documentation]: https://feedly.readthedocs.org/
[Bug Tracker]: http://github.com/tschellenbach/Feedly/issues
[Code]: http://github.com/tschellenbach/Feedly
[Mailing List]: https://groups.google.com/group/feedly-python
[IRC]: irc://irc.freenode.net/feedly-python
[Travis CI]: http://travis-ci.org/tschellenbach/Stream-Framework/


## Using Stream Framework ##

This quick example will show you how to publish a Pin to all your followers. So lets create
an activity for the item you just pinned.

```python
def create_activity(pin):
    from feedly.activity import Activity
    activity = Activity(
        pin.user_id,
        PinVerb,
        pin.id,
        pin.influencer_id,
        time=make_naive(pin.created_at, pytz.utc),
        extra_context=dict(item_id=pin.item_id)
    )
    return activity
```

Next up we want to start publishing this activity on several feeds.
First of we want to insert it into your personal feed, and secondly into the feeds of all your followers.
Lets start first by defining these feeds.

```python
# setting up the feeds

class PinFeed(RedisFeed):
    key_format = 'feed:normal:%(user_id)s'

class UserPinFeed(PinFeed):
    key_format = 'feed:user:%(user_id)s'
```

Writing to these feeds is very simple. For instance to write to the feed of user 13 one would do

```python

feed = UserPinFeed(13)
feed.add(activity)
```

But we don't want to publish to just one users feed. We want to publish to the feeds of all users which follow you.
This action is called a fanout and is abstracted away in the Feedly manager class.
We need to subclass the Feedly class and tell it how we can figure out which user follow us.

```python

class PinFeedly(Feedly):
    feed_classes = dict(
        normal=PinFeed,
    )
    user_feed_class = UserPinFeed
    
    def add_pin(self, pin):
        activity = pin.create_activity()
        # add user activity adds it to the user feed, and starts the fanout
        self.add_user_activity(pin.user_id, activity)

    def get_user_follower_ids(self, user_id):
        ids = Follow.objects.filter(target=user_id).values_list('user_id', flat=True)
        return {FanoutPriority.HIGH:ids}
    
feedly = PinFeedly()
```

Now that the feedly class is setup broadcasting a pin becomes as easy as

```python
feedly.add_pin(pin)
```

Calling this method wil insert the pin into your personal feed and into all the feeds of users which follow you.
It does so by spawning many small tasks via Celery. In Django (or any other framework) you can now show the users feed.

```python
# django example

@login_required
def feed(request):
    '''
    Items pinned by the people you follow
    '''
    context = RequestContext(request)
    feed = feedly.get_feeds(request.user.id)['normal']
    activities = list(feed[:25])
    context['activities'] = activities
    response = render_to_response('core/feed.html', context)
    return response

```

This example only briefly covered how Stream Framework works.
The full explanation can be found on read the docs.


## Features ##

Stream Framework uses celery and Redis/Cassandra to build a system with heavy writes and extremely light reads.
It features:

  - Asynchronous tasks (All the heavy lifting happens in the background, your users don't wait for it)
  - Reusable components (You will need to make tradeoffs based on your use cases, Stream Framework doesnt get in your way)
  - Full Cassandra and Redis support
  - The Cassandra storage uses the new CQL3 and Python-Driver packages, which give you access to the latest Cassandra features.
  - Built for the extremely performant Cassandra 2.0


## Background Articles ##

A lot has been written about the best approaches to building feed based systems.
Here's a collection on some of the talks:

[Twitter 2013] [twitter_2013]
Redis based, database fallback, very similar to Fashiolista's old approach.

[twitter_2013]: http://highscalability.com/blog/2013/7/8/the-architecture-twitter-uses-to-deal-with-150m-active-users.html

[Etsy feed scaling] [etsy]
(Gearman, separate scoring and aggregation steps, rollups - aggregation part two)

[etsy]: http://www.slideshare.net/danmckinley/etsy-activity-feeds-architecture/


[facebook]: http://www.infoq.com/presentations/Facebook-Software-Stack
[Facebook history] [facebook]


[djproject]: http://justquick.github.com/django-activity-stream/
[Django project with good naming conventions] [djproject]


[activity_stream]: http://activitystrea.ms/specs/atom/1.0/
[Activity stream specification] [activity_stream]

[Quora post on best practises] [quora]

[quora]: http://www.quora.com/What-are-best-practices-for-building-something-like-a-News-Feed?q=news+feeds

[Quora scaling a social network feed] [quora2]

[quora2]: http://www.quora.com/What-are-the-scaling-issues-to-keep-in-mind-while-developing-a-social-network-feed

[Redis ruby example] [redisruby]

[redisruby]: http://blog.waxman.me/how-to-build-a-fast-news-feed-in-redis

[FriendFeed approach] [friendfeed]

[friendfeed]: http://backchannel.org/blog/friendfeed-schemaless-mysql

[Thoonk setup] [thoonk]

[thoonk]: http://blog.thoonk.com/

[Yahoo Research Paper] [yahoo]

[yahoo]: http://research.yahoo.com/files/sigmod278-silberstein.pdf

[Twitter’s approach] [twitter]

[twitter]: http://www.slideshare.net/nkallen/q-con-3770885

[Cassandra at Instagram] [instagram]

[instagram]: http://planetcassandra.org/blog/post/instagram-making-the-switch-to-cassandra-from-redis-75-instasavings

Author

Thierry Schellenbach

Pip

feedly==0.11.3

Classifiers

  • Topic :: Software Development :: Libraries :: Python Modules
  • Topic :: Software Development
  • Topic :: Scientific/Engineering :: Mathematics
  • Programming Language :: Python
  • Operating System :: OS Independent
  • Natural Language :: English
  • License :: OSI Approved :: GNU General Public License (GPL)
  • Intended Audience :: System Administrators
  • Intended Audience :: Developers
  • Framework :: Django
  • Development Status :: 5 - Production/Stable
File Type Python Version Uploaded On Downloads
feedly-0.11.3.tar.gz Source Sept. 22, 2014 746
Version Release Date
0.11.3 Sept. 22, 2014
0.11.2 Sept. 10, 2014
0.11.1 Sept. 7, 2014
0.11.0 Sept. 6, 2014
0.10.10 June 30, 2014
0.10.9 June 29, 2014
0.10.8 June 16, 2014
0.10.7 June 16, 2014
0.10.6 June 15, 2014
0.10.5 May 20, 2014
0.10.4 May 20, 2014
0.10.3 May 20, 2014
0.10.2 May 20, 2014
0.10.1 April 10, 2014
0.9.42 March 10, 2014
0.9.41 March 7, 2014
0.9.40 Feb. 28, 2014
0.9.38 Feb. 17, 2014
0.9.37 Feb. 17, 2014
0.9.36 Feb. 17, 2014
0.9.35 Feb. 12, 2014
0.9.34 Jan. 29, 2014
0.9.32 Dec. 2, 2013
0.9.31 Dec. 2, 2013
0.9.3 Nov. 6, 2013
0.9.2 Oct. 29, 2013
0.9.1 Oct. 21, 2013
0.9.0 Oct. 18, 2013
0.8.134 Oct. 18, 2013
0.8.132 Oct. 15, 2013
0.8.131 Oct. 15, 2013
0.8.130 Oct. 15, 2013
0.8.119 Sept. 16, 2013
0.8.117 Sept. 13, 2013
0.8.115 Sept. 13, 2013
0.8.114 Sept. 9, 2013
0.8.113 Sept. 9, 2013
0.8.111 Sept. 5, 2013
0.8.110 Sept. 5, 2013
0.8.109 Sept. 4, 2013
0.8.108 Sept. 4, 2013
0.8.106 Sept. 3, 2013
0.8.105 Sept. 3, 2013
0.8.104 Sept. 3, 2013
0.8.103 Sept. 3, 2013
0.8.102 Aug. 30, 2013
0.8.97 Aug. 21, 2013
0.8.95 Aug. 21, 2013
0.8.93 Aug. 21, 2013
0.8.9 Aug. 16, 2013
0.8.8 Aug. 16, 2013
0.8.7 Aug. 16, 2013
0.8.6 Aug. 15, 2013
0.8.5 Aug. 14, 2013
0.8.4 Aug. 14, 2013
0.8.2 Aug. 13, 2013
0.7.9 Aug. 13, 2013
0.7.2 Aug. 7, 2013
0.7.1 Aug. 6, 2013
0.4.5 June 3, 2013
0.4.4 May 3, 2013
0.4.2 May 1, 2013
0.4.0 April 24, 2013
0.3.22 April 18, 2013
0.3.17 April 9, 2013
0.3.16 April 8, 2013
0.3.15 April 8, 2013
0.3.14 April 5, 2013
0.3.13 April 2, 2013
0.3.12 April 2, 2013
0.3.10 March 12, 2013
0.3.9 March 12, 2013
0.3.8 March 12, 2013
0.2.10 Feb. 21, 2013
0.2.9 Feb. 18, 2013
0.2.8 Feb. 14, 2013
0.2.7 Feb. 13, 2013
0.2.6 Feb. 11, 2013
0.2.4 Feb. 7, 2013
0.2.3 Feb. 6, 2013
0.2.2 Jan. 31, 2013
0.2.1 Jan. 29, 2013
0.2.0 Jan. 29, 2013
0.1.4 Jan. 25, 2013
0.1.3 Jan. 22, 2013
0.1.1 Jan. 18, 2013
0.1.0 Jan. 17, 2013
0.0.12 Oct. 23, 2012
0.0.11 Aug. 16, 2012
0.0.10 Aug. 14, 2012
0.0.9 Aug. 10, 2012
0.0.8 Aug. 10, 2012
0.0.7 Aug. 10, 2012
0.0.6 Aug. 10, 2012
0.0.5 Aug. 10, 2012
0.0.4 Aug. 10, 2012
0.0.3 Aug. 10, 2012
0.0.1 April 18, 2015
Date Package Version Action
April 18, 2015, 4:28 p.m. feedly 0.3.22 Release Created
April 18, 2015, 4:28 p.m. feedly 0.7.9 Release Created
April 18, 2015, 4:28 p.m. feedly 0.0.3 Release Created
April 18, 2015, 4:28 p.m. feedly 0.8.2 Release Created
April 18, 2015, 4:28 p.m. feedly 0.0.1 Release Created
April 18, 2015, 4:28 p.m. feedly 0.0.6 Release Created
April 18, 2015, 4:28 p.m. feedly 0.0.7 Release Created
April 18, 2015, 4:28 p.m. feedly 0.9.3 Release Created
April 18, 2015, 4:28 p.m. feedly 0.9.2 Release Created
April 18, 2015, 4:28 p.m. feedly 0.9.1 Release Created
April 18, 2015, 4:28 p.m. feedly 0.9.0 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.42 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.40 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.41 Release Created
April 18, 2015, 4:27 p.m. feedly 0.7.1 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.8 Release Created
April 18, 2015, 4:27 p.m. feedly 0.7.2 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.8 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.9 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.6 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.7 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.5 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.2 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.3 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.1 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.8 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.9 Release Created
April 18, 2015, 4:27 p.m. feedly 0.1.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.1.3 Release Created
April 18, 2015, 4:27 p.m. feedly 0.1.1 Release Created
April 18, 2015, 4:27 p.m. feedly 0.1.0 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.0 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.1 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.2 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.3 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.6 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.7 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.109 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.108 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.103 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.102 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.105 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.104 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.106 Release Created
April 18, 2015, 4:27 p.m. feedly 0.2.10 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.6 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.7 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.5 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.8 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.9 Release Created
April 18, 2015, 4:27 p.m. feedly 0.4.4 Release Created
April 18, 2015, 4:27 p.m. feedly 0.4.5 Release Created
April 18, 2015, 4:27 p.m. feedly 0.4.2 Release Created
April 18, 2015, 4:27 p.m. feedly 0.4.0 Release Created
April 18, 2015, 4:27 p.m. feedly 0.11.3 Release Created
April 18, 2015, 4:27 p.m. feedly 0.11.2 Release Created
April 18, 2015, 4:27 p.m. feedly 0.11.1 Release Created
April 18, 2015, 4:27 p.m. feedly 0.11.0 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.12 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.10 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.11 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.38 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.32 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.31 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.37 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.36 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.35 Release Created
April 18, 2015, 4:27 p.m. feedly 0.9.34 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.117 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.114 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.115 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.113 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.110 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.111 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.119 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.5 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.130 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.131 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.132 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.134 Release Created
April 18, 2015, 4:27 p.m. feedly 0.10.10 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.13 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.12 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.10 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.17 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.16 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.15 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.14 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.93 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.97 Release Created
April 18, 2015, 4:27 p.m. feedly 0.8.95 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.9 Release Created
April 18, 2015, 4:27 p.m. feedly 0.3.8 Release Created
April 18, 2015, 4:27 p.m. feedly 0.0.9 Release Created
April 18, 2015, 4:27 p.m. feedly Package Created