<s> from boto . s3 . key import Key <EOL> class Object ( Key ) : <EOL> def __init__ ( self , bucket , name = None ) : <EOL> Key . __init__ ( self , bucket , name = name ) <EOL> self . distribution = bucket . distribution <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % ( self . distribution . config . origin , self . name ) <EOL> def url ( self , scheme = '<STR_LIT:http>' ) : <EOL> url = '<STR_LIT>' % scheme <EOL> url += self . distribution . domain_name <EOL> if scheme . lower ( ) . startswith ( '<STR_LIT>' ) : <EOL> url += '<STR_LIT>' <EOL> else : <EOL> url += '<STR_LIT:/>' <EOL> url += self . name <EOL> return url <EOL> class StreamingObject ( Object ) : <EOL> def url ( self , scheme = '<STR_LIT>' ) : <EOL> return Object . url ( self , scheme ) </s>
