import boto
import boto.s3.connection
boto.set_stream_logger('boto')
host = '127.0.0.1'
access_key = 'user2'
secret_key = 'user2'
conn = boto.connect_s3(
                access_key,
                secret_key,
                host = host,
                is_secure = False,
                port=80,
                calling_format = boto.s3.connection.OrdinaryCallingFormat(),
                )
bucket = conn.get_bucket("user2mb1")
mpu = bucket.initiate_multipart_upload("large")
file = open("5M", "rb")
mpu.upload_part_from_file(file,part_num=1,size=1024*1024*5)
mpu.complete_upload()
