def __init__(self, username, api_key, <EOL>region=None, servicenet=False, timeout=<NUM_LIT:4>):
self._connParams = {}<EOL>self._connParams['<STR_LIT:username>'] = username<EOL>self._connParams['<STR_LIT>'] = api_key<EOL>if region is not None:<EOL><INDENT>try:<EOL><INDENT>authurl = getattr(cloudfiles, '<STR_LIT>' % str(region))<EOL>self._connParams['<STR_LIT>'] = authurl<EOL><DEDENT>except:<EOL><INDENT>raise Exception("<STR_LIT>" % str(region))<EOL><DEDENT><DEDENT>if servicenet:<EOL><INDENT>self._connParams['<STR_LIT>'] = True<EOL><DEDENT>self._connParams['<STR_LIT>'] = timeout<EOL>self._conn = cloudfiles.get_connection(**self._connParams)<EOL>
Initialize connection to Rackspace Cloud Files.

        @param username: Rackspace Cloud username
        @param api_key:  Rackspace Cloud api_key
        @param region:   Try passing "us" for US Auth Service, and "uk" UK Auth 
                         Service; omit parameter to use library default.
        @servicenet:     If True, Rackspace ServiceNet network will be used to 
                         access Cloud Files.
        @timeout:        Connection timeout in seconds. (Default: 4)