Skip to content

Instantly share code, notes, and snippets.

@misja
misja / tweepy_status_monkeypatch.py
Created August 31, 2011 12:30
Set json data as an attribute in a tweepy Status object.
import tweepy
import json
@classmethod
def parse(cls, api, raw):
status = cls.first_parse(api, raw)
setattr(status, 'json', json.dumps(raw))
return status
tweepy.models.Status.first_parse = tweepy.models.Status.parse