smartfeed implementation in python