brew.grains¶
-
class
brew.grains.
Grain
(name, color=None, ppg=None, hwe=None)¶ A representation of a type of grain.
Parameters: - name (str) – The name of the grain
- color (float) – The color of the grain in SRM
- ppg (float) – The potential points per gallon
- hwe (float) – The hot water extract value
Raises: - GrainException – If color is not provided
- GrainException – If ppg or hwe is not provided
- GrainException – If both ppg and hwe are provided
-
convert_to_cereal
(ppg=None)¶
-
convert_to_dme
(ppg=44.0)¶
-
convert_to_lme
(ppg=36.0)¶
-
format
()¶
-
get_working_yield
(brew_house_yield)¶ Get Working Yield
Parameters: brew_house_yield (float) – The Percent Brew House Yield Returns: The working yield Return type: float
-
to_dict
()¶
-
to_json
()¶
-
class
brew.grains.
GrainAddition
(grain, weight=None, grain_type=u'cereal', units=u'imperial')¶ A representation of the grain as added to a Recipe.
Parameters: - grain (Grain) – The Grain object
- weight (float) – The weight of the grain addition
- grain_type (str) – The type of the grain being used
- units (str) – The units
-
change_units
()¶ Change units of the class from one type to the other
Returns: Grain Addition in new unit type Return type: GrainAddition
-
convert_to_cereal
(ppg=None, brew_house_yield=1.0)¶ Convert Grain Addition to GRAIN_TYPE_CEREAL
Parameters: - ppg (float) – The potential points per gallon
- brew_house_yield (float) – The brew house yield as a percentage
Returns: GrainAddition of type GRAIN_TYPE_CEREAL
Return type:
-
convert_to_dme
(ppg=44.0, brew_house_yield=1.0)¶ Convert Grain Addition to GRAIN_TYPE_DME
Parameters: - ppg (float) – The potential points per gallon
- brew_house_yield (float) – The brew house yield as a percentage
Returns: GrainAddition of type GRAIN_TYPE_DME
Return type:
-
convert_to_lme
(ppg=36.0, brew_house_yield=1.0)¶ Convert Grain Addition to GRAIN_TYPE_LME
Parameters: - ppg (float) – The potential points per gallon
- brew_house_yield (float) – The brew house yield as a percentage
Returns: GrainAddition of type GRAIN_TYPE_LME
Return type:
-
format
()¶
-
get_cereal_weight
(ppg=30.0)¶ Get the weight of the addition in cereal weight
Parameters: ppg (float) – The potential points per gallon Returns: Cereal weight Return type: float
-
get_dme_weight
()¶ Get the weight of the addition in Dry Malt Extract weight
Returns: Dry weight Return type: float
-
get_gravity_units
()¶ Get the gravity units for the Grain Addition :return: Gravity Units as PPG or HWE depending on units :rtype: float
-
get_lme_weight
()¶ Get the weight of the addition in Liquid Malt Extract weight
Returns: LME weight Return type: float
-
get_weight_map
()¶ Get map of grain weights by type
Returns: Grain weights Return type: dict
-
gu
¶
-
set_units
(units)¶ Set the units and unit types
Parameters: units (str) – The units
-
to_dict
()¶
-
to_json
()¶
-
classmethod
validate
(grain_data)¶