boto/boto — pull request #423 by aventurella (2011-12-05 01:29:20+00:00)
Title: Added load_credential_tuple to boto.pyami.config.Config

I had a need to set different access/secrets per application, and not stored on the file system. Instead stored in the configuration for my applications. load_credential_tuple allowed me to do that.

I could have initialized a new Config() to replace boto.config where Config(fp=myStringIOObject). That may still be the more appropriate way, It just seemed like the Config object should be responsible for building the StringIO object.

Anyway,

usage:

import boto
boto.config.load_credential_tuple(("aws_access_key_id", "my_key", "aws_secret_access_key", "my_secret"))
ses = boto.connect_ses()
ses.send_email("email1@example.com", "Credential Tuple Test", "lorem ipsum dolor sit amet", "email2@example.com")