From e697d7206d41a1e1d2c2dcf668ce50ebc6cd9e73 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Sun, 14 Jun 2009 04:07:51 -0400 Subject: [PATCH] An example showing the various ways to instantiate tango. --- tango_examples/tango_setup.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tango_examples/tango_setup.py diff --git a/tango_examples/tango_setup.py b/tango_examples/tango_setup.py new file mode 100644 index 0000000..56d2429 --- /dev/null +++ b/tango_examples/tango_setup.py @@ -0,0 +1,11 @@ +import tango + +# Using no authentication and specifying Debug +twitter = tango.setup(debug=True) + +# Using Basic Authentication +twitter = tango.setup(authtype="Basic", username="example", password="example") + +# Using OAuth Authentication (Note: OAuth is the default, specify Basic if needed) +auth_keys = {"consumer_key": "yourconsumerkey", "consumer_secret": "yourconsumersecret"} +twitter = tango.setup(username="example", password="example", oauth_keys=auth_keys)