brew.recipes¶
-
class
brew.recipes.
Recipe
(name, grain_additions=None, hop_additions=None, yeast=None, brew_house_yield=0.7, start_volume=7.0, final_volume=5.0, units=u'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
- 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: - RecipeException – If the units of any GrainAddition is not the same as the units of the Recipe
- RecipeException – 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
(short=False)¶ Format the recipe for printing
Parameters: short (bool) – Produce short output
-
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, ppg=30.0)¶ 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_grain_additions_by_type
(grain_type)¶ Return grain additions by given grain_type
Parameters: grain_type (str) – The type of grains to return Returns: list of GrainAddition objects
-
get_hop_additions_by_type
(hop_type)¶ Return hop additions by given hop_type
Parameters: hop_type (str) – The type of hops to return Returns: list of HopAddition objects
-
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.
-
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
-
get_wort_correction
(current_gu, current_volume, efficiency=44.0)¶ Get the amount of sugar to add to correct the wort
-
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, brew_house_yield=0.7, start_volume=7.0, final_volume=5.0, units=u'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
- 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: - RecipeException – If sum of percentages does not equal 1.0
- RecipeException – If length of percent_list does not match length of self.grain_list
-
get_hop_additions
(percent_list, boil_time_list, hop_type=u'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: - RecipeException – If sum of percentages does not equal 1.0
- RecipeException – If length of percent_list does not match length of self.grain_list
- RecipeException – 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