Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/d/j/djangy-HEAD/install/s3list.py   djangy(Download)
def list_files():
    conn = S3.AWSAuthConnection(config.S3_ACCESS_KEY, config.S3_SECRET)
    result = conn.check_bucket_exists(config.S3_BUCKET)
    if result.status != 200:
        result = conn.create_located_bucket(config.S3_BUCKET, S3.Location.DEFAULT)
 
    result = conn.list_bucket(config.S3_BUCKET)

src/d/j/djangy-HEAD/install/s3put.py   djangy(Download)
def upload(filename):
    conn = S3.AWSAuthConnection(config.S3_ACCESS_KEY, config.S3_SECRET)
    result = conn.check_bucket_exists(config.S3_BUCKET)
    if result.status != 200:
        result = conn.create_located_bucket(config.S3_BUCKET, S3.Location.DEFAULT)

src/d/j/djangy-HEAD/install/s3get.py   djangy(Download)
def retrieve(filename):
    conn = S3.AWSAuthConnection(config.S3_ACCESS_KEY, config.S3_SECRET)
    assert 200 == conn.check_bucket_exists(config.S3_BUCKET).status
 
    result = conn.get(config.S3_BUCKET, filename)