From 99fae398ae440994b78805aa3d185a1d583f6839 Mon Sep 17 00:00:00 2001 From: ryanmcgrath Date: Mon, 25 Oct 2010 19:28:33 -0700 Subject: [PATCH] Updated to reflect new OAuth/Basic Auth scenario Updated A new and easy way to access Twitter data with Python. (textile) --- Home.textile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Home.textile b/Home.textile index d2447e0..7dde63f 100644 --- a/Home.textile +++ b/Home.textile @@ -1,14 +1,14 @@ -h1. A new and easy way to access Twitter data with Python. - -Twython takes care of authenticating a user with Twitter, so you can get full API access. Twython also wraps the Twitter Search API, something which other libraries don't do at the moment. As a final plus, Twython (will have) support for OAuth with Twitter, while maintaining support for Basic Authentication. If that hasn't convinced you yet, check out the example code below: +h1. An easy way to access Twitter data with Python. +Twython is a Python API wrapper for the Twitter REST API.
 
-import twython
+from twython import Twython
 
-# Create a Twython instance using Basic (HTTP) Authentication and update our Status
-twitter = twython.core.setup(username="example", password="example")
-twitter.updateStatus("See how easy this was?")
+# Create a Twython instance
+# Note: For OAuth examples, see the included Django application.
+twitter = Twython()
+twitter.searchTwitter(q="bert")
 
 
@@ -18,7 +18,7 @@ Maybe you're happy with the current crop of Twitter libraries for Python, but I' h1. What does Twython require? -Twython requires the "simplejson":http://code.google.com/p/simplejson/ library for parsing Twitter responses. +Twython requires the "simplejson":http://code.google.com/p/simplejson/ library for parsing Twitter responses, as well as oauth2 for handling OAuth authentication. h1. I have a patch, can I contribute back?