From 174e0bc0453b85fa42410cc150b7fcc3bdb488e8 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Thu, 25 Jun 2009 01:49:00 -0400 Subject: [PATCH] New README --- README | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/README b/README index 2b8c86d..3624831 100644 --- a/README +++ b/README @@ -1,50 +1,38 @@ -Tango - Easy Twitter utilities for Django-based applications +Tango - Easy Twitter utilities in Python ----------------------------------------------------------------------------------------------------- -As a Django user, I've often wanted a way to easily implement Twitter scraping calls in my applications. -I could write them from scratch using the already existing (and quite excellent) library called -"Python-Twitter" (http://code.google.com/p/python-twitter/)... +I wrote Tango because I found that other Python Twitter libraries weren't that up to date. Certain +things like the Search API, OAuth, etc, don't seem to be fully covered. This is my attempt at +a library that offers more coverage. -However, Python-Twitter doesn't (currently) handle some things well, such as using Twitter's -Search API. I've found myself wanting a largely drop-in solution for this (and other) -problems... +This is my first library I've ever written in Python, so there could be some stuff in here that'll +make a seasoned Python vet scratch his head, or possibly call me insane. It's open source, though, +and I'm open to anything that'll improve the library as a whole. -Thus, we now have Tango. +OAuth support is in the works, but every other part of the Twitter API should be covered. Tango +handles both Baisc (HTTP) Authentication and OAuth, and OAuth is the default method for +Authentication. To override this, specify 'authtype="Basic"' in your tango.setup() call. +Documentation is forthcoming, but Tango attempts to mirror the Twitter API in a large way. All +parameters for API calls should translate over as function arguments. -Installation +Requirements ----------------------------------------------------------------------------------------------------- -You can install this like any other Django-app; just throw it in as a new app, register it in your -settings as an "Installed App", and sync the models. - Tango requires (much like Python-Twitter, because they had the right idea :D) a library called -"simplejson" - Django should include this by default, but if you need the library for any reason, -you can grab it at the following link: +"simplejson". You can grab it at the following link: http://pypi.python.org/pypi/simplejson -Tango also works well as a standalone Python library, so feel free to use it however you like. - Example Use ----------------------------------------------------------------------------------------------------- -An extremely generic, and somewhat useless, demo is below. Instantiate your class by passing in a -Twitter username, then all functions will come off of that. Results are returned as a list. +import tango -testList = tango.setup(username="ryanmcgrath") -newTestList = testList.getSearchTimeline("b", "20") -for testTweet in newTestList: - print testTweet +twitter = tango.setup(authtype="Basic", username="example", password="example") +twitter.updateStatus("See how easy this was?") Questions, Comments, etc? ----------------------------------------------------------------------------------------------------- -I want to note that Tango is *not* like other Twitter libraries - we don't handle authentication or -anything of the sort (yet); there are already battle-tested solutions out there for both Basic Auth and -OAuth. This isn't production ready quite yet. - -Tango will (hopefully) be compatible with Python 3; as it stands, I think it might be now, I've just -not had the time to check over it. - -My hope is that Tango is so plug-and-play that you'd never *have* to ask any questions, but if +My hope is that Tango is so simple that you'd never *have* to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net.