def get_turbine_data_from_oedb(turbine_type, fetch_curve, overwrite=False):
    r"""
    Fetches data for one wind turbine type from the OpenEnergy Database (oedb).

    If turbine data exists in local repository it is loaded from this file. The
    file is created when turbine data was loaded from oedb in
    :py:func:`~.load_turbine_data_from_oedb`. Use this function with
    `overwrite=True` to overwrite your file with newly fetched data.
    Use :py:func:`~.check_local_turbine_data` to check
    weather your local file is up to date.

    Parameters
    ----------
    turbine_type : string
        Specifies the turbine type data is fetched for.
        Use :py:func:`~.get_turbine_types` to see a table of all wind turbines
        for which power (coefficient) curve data is provided.
    fetch_curve : string
        Parameter to specify whether a power or power coefficient curve
        should be retrieved from the provided turbine data. Valid options are
        'power_curve' and 'power_coefficient_curve'. Default: None.
    overwrite : boolean
        If True local file is overwritten by newly fetch data from oedb, if
        False turbine data is fetched from previously saved file.

    Returns
    -------
    Tuple (pandas.DataFrame, float)
        Power curve or power coefficient curve (pandas.DataFrame) and nominal
        power (float) of one wind turbine type. Power (coefficient) curve
        DataFrame contains power coefficient curve values (dimensionless) or
        power curve values in W with the corresponding wind speeds in m/s.

    """
    # hdf5 filename
    filename = os.path.join(os.path.dirname(__file__), 'data',
                            'turbine_data_oedb.h5')
    if os.path.isfile(filename) and not overwrite:
        logging.debug("Turbine data is fetched from {}".format(filename))
        with pd.HDFStore(filename) as hdf_store:
            turbine_data = hdf_store.get('turbine_data')
    else:
        turbine_data = load_turbine_data_from_oedb()
    turbine_data.set_index('turbine_type', inplace=True)
    # Set `curve` depending on `fetch_curve` to match names in oedb
    curve = ('cp_curve' if fetch_curve == 'power_coefficient_curve'
             else fetch_curve)
    # Select curve and nominal power of turbine type
    try:
        df = turbine_data.loc[turbine_type]
    except KeyError:
        raise KeyError("Turbine type '{}' not in database. ".format(
            turbine_type) + "Use 'get_turbine_types()' to see a table of " +
                       "possible wind turbine types.")
    if df[curve] is not None:
        df = pd.DataFrame(df[curve])
    else:
        sys.exit("{} of {} not available in ".format(curve, turbine_type) +
                 "oedb. Use 'get_turbine_types()' to see for which turbine " +
                 "types power coefficient curves are available.")
    nominal_power = turbine_data.loc[turbine_type][
                        'installed_capacity_kw'] * 1000
    df.columns = ['wind_speed', 'value']
    if fetch_curve == 'power_curve':
        # power in W
        df['value'] = df['value'] * 1000
    return df, nominal_power
r"""
    Fetches data for one wind turbine type from the OpenEnergy Database (oedb).

    If turbine data exists in local repository it is loaded from this file. The
    file is created when turbine data was loaded from oedb in
    :py:func:`~.load_turbine_data_from_oedb`. Use this function with
    `overwrite=True` to overwrite your file with newly fetched data.
    Use :py:func:`~.check_local_turbine_data` to check
    weather your local file is up to date.

    Parameters
    ----------
    turbine_type : string
        Specifies the turbine type data is fetched for.
        Use :py:func:`~.get_turbine_types` to see a table of all wind turbines
        for which power (coefficient) curve data is provided.
    fetch_curve : string
        Parameter to specify whether a power or power coefficient curve
        should be retrieved from the provided turbine data. Valid options are
        'power_curve' and 'power_coefficient_curve'. Default: None.
    overwrite : boolean
        If True local file is overwritten by newly fetch data from oedb, if
        False turbine data is fetched from previously saved file.

    Returns
    -------
    Tuple (pandas.DataFrame, float)
        Power curve or power coefficient curve (pandas.DataFrame) and nominal
        power (float) of one wind turbine type. Power (coefficient) curve
        DataFrame contains power coefficient curve values (dimensionless) or
        power curve values in W with the corresponding wind speeds in m/s.