brew.hops

class brew.hops.Hop(name, percent_alpha_acids=None)

A representation of a type of Hop.

Parameters:
  • name (str) – The name of the hop
  • percent_alpha_acids (float) – The percent alpha acids in the hop
Raises:

HopException – If percent_alpha_acids is not provided

format()
to_dict()
to_json()
class brew.hops.HopAddition(hop, weight=None, boil_time=None, hop_type=u'pellet', utilization_cls=<class 'brew.utilities.hops.HopsUtilizationGlennTinseth'>, utilization_cls_kwargs=None, units=u'imperial')

A representation of the Hop as added to a Recipe.

Parameters:
  • hop (Hop) – The Hop object
  • weight (float) – The weight of the hop addition
  • boil_time (float) – The amount of time the hop is boiled
  • hop_type (float) – The type of the hop being used
  • utilization_cls (HopsUtilization) – The utilization class used for calculation
  • utilization_cls_kwargs (dict) – The kwargs to initialize the utilization_cls object
  • units (str) – The units
change_units()

Change units of the class from one type to the other

Returns:Hop Addition in new unit type
Return type:HopAddition
format()
get_alpha_acid_units()

Get Alpha Acid Units

Returns:alpha acid units
Return type:float
get_ibus(sg, final_volume)

Get the IBUs

Parameters:
  • sg (float) – The specific gravity of the wort
  • final_volume (float) – The final volume of the wort
Returns:

The IBUs of the wort

Return type:

float

set_units(units)

Set the units and unit types

Parameters:units (str) – The units
to_dict()
to_json()
classmethod validate(hop_data)