brew.recipes

class brew.recipes.Recipe(name, grain_additions=None, hop_additions=None, yeast=None, percent_brew_house_yield=0.7, start_volume=7.0, final_volume=5.0, units='imperial')

A representation of a Recipe that can be brewed to make beer.

Parameters:
  • name (str) – The name of the recipe
  • grain_additions (list of GrainAddition objects) – A list of Grain Additions
  • hop_additions (list of HopAddition objects) – A list of Hop Additions
  • percent_brew_house_yield (float) – The brew house yield
  • start_volume (float) – The starting volume of the wort
  • final_volume (float) – The final volume of the wort
  • units (str) – The units
Raises:
  • Exception – If the units of any GrainAddition is not the same as the units of the Recipe
  • Exception – If the units of any HopAddition is not the same as the units of the Recipe
abv
bg
change_units()

Change units of the class from one type to the other

Returns:Recipe in new unit type
Return type:Recipe
color
fg
format()
get_boil_gravity(evaporation=0.0)

Get the boil specific gravity

Parameters:evaporation (float) – Percent water evaporation during boil
Returns:The boil specific gravity
Return type:float
get_boil_gravity_units(evaporation=0.0)

Get the boil gravity units

Parameters:evaporation (float) – Percent water evaporation during boil
Returns:The boil gravity units
Return type:float
get_brew_house_yield(plato_actual, vol_actual)

Get the Brew House Yield

Parameters:
  • plato_actual (float) – The actual degrees Plato
  • vol_actual (float) – The actual volume collected from the kettle
Returns:

Brew House Yield

Rtyle:

float

get_bu_to_gu()

Get BU to GU Ratio

Returns:Ratio of Bitterness Units to Original Gravity Units
Return type:float
get_degrees_plato()

Get the degrees plato

Returns:The degrees plato of the wort
Return type:float
get_extract_weight()

Get the weight of the extract

Returns:The weight of extract
Return type:float
get_final_gravity()

Get the final specific gravity

Returns:The final specific gravity
Return type:float
get_final_gravity_units()

Get the final gravity units

Returns:The final gravity units
Return type:float
get_grain_add_cereal_weight(grain_add)

Get Grain Addition as Cereal

Parameters:grain_add (GrainAddition) – The Grain Addition
Returns:The weight of the grain as Cereal
Return type:float

When converting DME or LME to grain its important to remember that you can’t get 100% efficiency from grains. Dividing by the brew house yield will increase the size of the grain accordingly.

get_grain_add_dry_weight(grain_add)

Get Grain Addition as DME

Parameters:grain_add (GrainAddition) – The Grain Addition
Returns:The weight of the grain as DME
Return type:float

When converting Grain to DME its important to remember that you can’t get 100% efficiency from grains. Multiplying by the brew house yield will decrease the size of the DME accordingly.

get_mash_water_volume(liquor_to_grist_ratio)

Get the Mash Water Volume

Parameters:liquor_to_grist_ratio (float) – The Liquor to Grist Ratio
Returns:The mash water volume
Return type:float
get_original_gravity()

Get the original specific gravity

Returns:The original specific gravity
Return type:float
get_original_gravity_units()

Get the original gravity units

Returns:The original gravity units
Return type:float
get_percent_ibus(hop_add)

Get the percentage the hops contributes to total ibus

Parameters:hop_add (HopAddition) – The Hop Addition
Returns:The percent the hops contributes to total ibus
Return type:float
get_percent_malt_bill(grain_add)

Get Percent Malt Bill

Parameters:grain_add (GrainAddition) – The Grain Addition
Returns:The percent extract the addition adds to the bill
Return type:float

To ensure different additions are measured equally each is converted to dry weight.

classmethod get_strike_temp(mash_temp, malt_temp, liquor_to_grist_ratio)

Get Strike Water Temperature

Parameters:
  • mash_temp (float) – Mash Temperature
  • malt_temp (float) – Malt Temperature
  • liquor_to_grist_ratio (float) – The Liquor to Grist Ratio
Returns:

The strike water temperature

Return type:

float

get_total_dry_weight()

Get total DME weight

Returns:The total weight of the DME
Return type:float
get_total_grain_weight()

Get total Cereal weight

Returns:The total weight of the Cereal
Return type:float
get_total_ibu()

Convenience method to get total IBU for the recipe

Returns:The total IBU for the Recipe
Return type:float
get_total_points()

Get the total points of the recipe

Returns:PPG or HWE depending on the units of the Recipe
Return type:float
get_total_wort_color()

Get the Total Color of the Wort in SRM using Morey Power Equation

Returns:The total color of the wort in SRM
Return type:float
get_total_wort_color_map()

Get a map of wort color by method

Returns:A map of wort color in SRM and EBC by method (Morey, Daniels, and Mosher)
Return type:dict
get_wort_color(grain_add)

Get the Wort Color in SRM

Parameters:grain_add (GrainAddition) – The Grain Addition to calculate
Returns:The SRM of the Grain Addition
Return type:float
get_wort_color_mcu(grain_add)

Get the Wort Color in Malt Color Units

Parameters:grain_add (GrainAddition) – The Grain Addition to calculate
Returns:The MCU of the Grain Addition
Return type:float
grain_lookup = {}
hop_lookup = {}
ibu
og
plato
set_units(units)

Set the units and unit types

Parameters:units (str) – The units
to_dict()
to_json()
classmethod validate(recipe)
class brew.recipes.RecipeBuilder(name, grain_list=None, hop_list=None, target_ibu=33.0, target_og=1.05, percent_brew_house_yield=0.7, start_volume=7.0, final_volume=5.0, units='imperial')

A class for building recipes

Parameters:
  • name (str) – The name of the recipe
  • grain_list (list of Grain objects) – A list of Grains
  • hop_list (list of Hop objects) – A list of Hops
  • target_ibu (float) – The IBU Target
  • target_og (float) – The Original Gravity Target
  • percent_brew_house_yield (float) – The brew house yield
  • start_volume (float) – The starting volume of the wort
  • final_volume (float) – The final volume of the wort
  • units (str) – The units
change_units()

Change units of the class from one type to the other

Returns:RecipeBuilder in new unit type
Return type:RecipeBuilder
get_grain_additions(percent_list)

Calculate GrainAdditions from list of percentages

Parameters:

percent_list (list) – A list of percentages mapped to each Grain

Returns:

A list of Grain Additions

Return type:

list(GrainAddition)

Raises:
  • Exception – If sum of percentages does not equal 1.0
  • Exception – If length of percent_list does not match length of self.grain_list
get_hop_additions(percent_list, boil_time_list, hop_type='pellet', utilization_cls=<class 'brew.utilities.hops.HopsUtilizationGlennTinseth'>)

Calculate HopAdditions from list of boil times

Parameters:
  • boil_time_list (list) – A list of boil times mapped to each Hop
  • utilization_cls (HopsUtilization) – The utilization class used for calculation
Returns:

A list of Hop Additions

Return type:

list(HopAddition)

Raises:
  • Exception – If sum of percentages does not equal 1.0
  • Exception – If length of percent_list does not match length of self.grain_list
  • Exception – If length of boil_time_list does not match length of self.hop_list
get_yeast_attenuation(abv)

Estimate yeast attenuation given a target abv

Parameters:abv (float) – Alcohol by Volume
Returns:Yeast Attenuation Percentage
Return type:float

This uses the ABV Standard Equation

grain_lookup = {}
hop_lookup = {}
set_units(units)

Set the units and unit types

Parameters:units (str) – The units