Return the default env file name, with optional name appended
421777
function _getFileName(name) {
  if (typeof name === 'undefined' || name.trim() === '') {
    return config.get('env.basename');
  }

  return `${config.get('env.basename')}.${name}`;
}
97892
def get_env_key(obj, key=None):
    
    return str.join('_', [obj.__module__.replace('.','_').upper(),
        key.upper()])
568694
def get_boolean_env(name, default):
    
    default = 'true' if default else 'false'
    return os.getenv(name, default).lower() in {'true', 'yes', 'y', '1'}
839788
def make_env_key(app_name, key):
    """"""
    key = key.replace('-', '_').replace(' ', '_')
    return str("_".join((x.upper() for x in (app_name, key))))
1270729
def get_env():
    
    env = "Development"
    if _env_key in os.environ:
        env = os.environ[_env_key].lower().capitalize()
    return env
621204
def optional_string(name, default)
      optional_custom(name) do |env|
        if value = env[name.to_s.upcase]
          {name => value}
        else
          {name => default}
        end
      end
    end
385793
def find_dotenv(filename='.env', raise_error_if_not_found=False, usecwd=False):
    
    if usecwd or '__file__' not in globals():
        # should work without __file__, e.g. in REPL or IPython notebook
        path = os.getcwd()
    else:
        # will work for .py files
        frame_filename = sys._getframe().f_back.f_code.co_filename
        path = os.path.dirname(os.path.abspath(frame_filename))

    for dirname in _walk_to_root(path):
        check_path = os.path.join(dirname, filename)
        if os.path.exists(check_path):
            return check_path

    if raise_error_if_not_found:
        raise IOError('File not found')

    return ''
1329615
def get_environment(name):
    """"""
    if name == "_default":
        return env_from_template(name)
    filename = os.path.join("environments", name + ".json")
    try:
        with open(filename) as f:
            try:
                return json.loads(f.read())
            except ValueError as e:
                msg = 'LittleChef found the following error in'
                msg += ' "{0}":\n                {1}'.format(filename, str(e))
                abort(msg)
    except IOError:
        raise FileNotFoundError('File {0} not found'.format(filename))
617468
def guess_python_env():
    """"""
    version, major, minor = get_version_info()
    if 'PyPy' in version:
        return 'pypy3' if major == 3 else 'pypy'
    return 'py{major}{minor}'.format(major=major, minor=minor)
1123506
def getenv(name, **kwargs):
    
    default_value = kwargs.pop('default', None)
    desired_type = kwargs.pop('type', str)
    list_separator = kwargs.pop('separator', ',')

    value = os.getenv(name, None)

    if value is None:
        if default_value is None:
            return None
        else:
            return default_value

    if desired_type is bool:
        if value.lower() in ['false', '0']:
            return False
        else:
            return bool(value)

    if desired_type is list or desired_type is tuple:
        value = value.split(list_separator)
        return desired_type(value)

    if desired_type is dict:
        return dict(literal_eval(value))

    return desired_type(value)
686108
def clean_env(uchroot_cmd, varnames):
    """"""
    env = uchroot_cmd["/usr/bin/env"]
    __clean_env = env["-u", ",".join(varnames)]
    return __clean_env
1203202
def _getPFilename(self,native,prompt):
        
        return self.get(native=native,prompt=prompt)
712180
def get_env_default(self, variable, default):
        
        if variable in os.environ:
            env_var = os.environ[variable]
        else:
            env_var = default
        return env_var
1111614
def bind_env(self, *input_):
        
        if len(input_) == 0:
            return "bind_env missing key to bind to"

        key = input_[0].lower()

        if len(input_) == 1:
            env_key = self._merge_with_env_prefix(key)
        else:
            env_key = input_[1]

        self._env[key] = env_key

        if self._key_delimiter in key:
            parts = input_[0].split(self._key_delimiter)
            env_info = {
                "path": parts[1:-1],
                "final_key": parts[-1],
                "env_key": env_key
            }

            if self._env.get(parts[0]) is None:
                self._env[parts[0]] = [env_info]
            else:
                self._env[parts[0]].append(env_info)

        return None
1290135
def get_conf_path_from_env():
    '''
    
    '''
    config_path = os.environ.get('PECAN_CONFIG')
    if not config_path:
        error = "PECAN_CONFIG is not set and " \
                "no config file was passed as an argument."
    elif not os.path.isfile(config_path):
        error = "PECAN_CONFIG was set to an invalid path: %s" % config_path
    else:
        return config_path

    raise RuntimeError(error)
519842
function getEnvironment (options) {
  var env;

  if (options.environment) {
    env = options.environment;
  } else {
    env = process.env.NODE_ENV;
  }

  if (env) {
    if (env === 'prod') {
      env = 'production';
    } else if (env === 'dev') {
      env = 'development';
    }
  } else {
        // Default to "development"
    env = 'development';
  }

  return env;
}
1103750
def get_default_env(self):
        
        return dict_diff(
            old=ansible_mitogen.process.MuxProcess.original_env,
            new=os.environ,
        )