<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_file_api(conf):
 """ Creates a SmartlingFileApi from the given config """

    api_key = conf.config.get('api-key', os.environ.get('SMARTLING_API_KEY'))
    project_id = conf.config.get('project-id', os.environ.get('SMARTLING_PROJECT_ID'))

    if not project_id or not api_key:
        raise SmarterlingError('config.api-key and config.project-id are required configuration items')
    proxy_settings=None
    if conf.config.has_key('proxy-settings'):
        proxy_settings = ProxySettings(
            conf.config.get('proxy-settings').get('username', ''),
            conf.config.get('proxy-settings').get('password', ''),
            conf.config.get('proxy-settings').get('host', ''),
            int(conf.config.get('proxy-settings').get('port', '80')))
    return SmartlingFileApiFactory().getSmartlingTranslationApi(
        not conf.config.get('sandbox', False),
        api_key,
        project_id,
        proxySettings=proxy_settings)