Skip to main content

brew-tools

╔╗ ╦═╗╔═╗╦ ╦  ╔╦╗╔═╗╔═╗╦  ╔═╗
╠╩╗╠╦╝║╣ ║║║───║ ║ ║║ ║║  ╚═╗
╚═╝╩╚═╚═╝╚╩╝   ╩ ╚═╝╚═╝╩═╝╚═╝

Build Status Documentation Status PyPI version

A command line utility that offers a set of calculators for home brewers.

NOTE: All values and calculations are provided as guidelines only. Brew-tools should not be used for professional brewing. No warranty or guarantee of accuracy is provided on the information provided by this calculator.

Description

Need to do a quick calculation during your brew day? Don't fancy digging through a GUI application, or a web based tool? Prefer to do simple things in a terminal?

Then brew-tools is for you.

Currently brew-tools includes:

  • ABV calculator
  • Keg priming calculator
  • Priming sugar calculator
  • Quick infusion calculator
  • Adjust gravity with dme calculator
  • Apparent and Real attenuation calculator
  • Final gravity from a given attenuation percentage
  • Gravity adjustment by boil off/dilution calculator
  • New gravity after volume adjustment
  • Strike water temp calculator
  • Strike water temperature
  • Simple unit converter

More to come

See the changelog for updates in each version

Installation

Brew-tools is available from PyPI

pip install brew-tools

You can also clone/download this repository and install it using pip

cd <brew-tools-dir>
pip install .

Usage

When first starting Brew tools you will be asked for your preferred unit type, metric or imperial. This is then stored in a config file and used as the default unit. This can be temporarily changed with the --unit option.

Brew tools has built in help

Usage: brew_tools [OPTIONS] COMMAND [ARGS]...

  Brew-Tools is a small commandline utility that offers quick access to a
  set of calculators and tools to help homebrewers create their brews.

  All values and calculations are provided as guidelines only. Brew-tools
  should not be used for professional brewing. No warranty or guarantee of
  accuracy is provided on the information provided by this calculator.

Options:
  --version  Show the version and exit.
  --unit [metric|imperial]  Ignore config and use a different unit.
  --help     Show this message and exit.

Commands:
  abv             Calculates the ABV from the original and final gravity...
  adjust-gravity  Calculate the amount of liquid to boil off/dilute with to...
  adjust-volume   Calculate the new gravity after a change in wort volume...
  attenuation     Calculates the apparent and real attenuation from the...
  convert         Convert a value between given measurements.
  dme             Given the current volume of the mash, work out how much...
  fg-from-att     Given a starting gravity and a desired attenuation level,...
  infuse          Given the current mash temperature, work out how much...
  kegpsi          Calculates the regulator pressure required to achieve...
  prime 

and also for its commands

brew-tools infuse --help
Usage: brew-tools infuse [OPTIONS]

Options:
  -temp FLOAT    Current temperature of mash
  -target FLOAT  Target temperature of mash
  -ratio FLOAT   Grist/water ratio
  -grain FLOAT   Weight of grain in mash
  -water FLOAT   Temp of infusion water
  --help         Show this message and exit.

If the inputs are not passed via the command line arguments, brew tools will prompt the user for input.

For more information see the documentation

Development

If you want to help develop brew tools you should install it into a virtual environment. The current version of brew-tools uses uv to manage virtual environments and such.

In order to start, install uv and change into the brew-tools directory. From there you can run

uv sync

which will create a virtual environment and install the dependencies as well as install brew_tools to the environment. To run brew_tools in the development environment run

uv run brew_tools

Which will launch brew_tools. Simply add arguments to the end of the line.

To run the tests you use

uv run pytest tests

In addition to the tests it's advisable to run a linter of the source as Github actions will also check for linting and formatting errors.

rye run ruff format --check src tests

or if you want to format the files automatically

rye run ruff format src tests

For linting use

rye run ruff check src tests

Thanks

Thanks to

  • /u/DAMNIT_REZNO - for inspiring me to start this project
  • SlayterDev - DME addition calculator
  • Szczyp - Add input for grain temp and fix missing input function

License

Brew Tools is released under the MIT license.

See LICENSE.txt for more details

Metadata

Release files for brew-tools 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brew-tools 0.6.0
File Size Uploaded
brew_tools-0.6.0.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brew-tools 0.6.0
File Interpreter ABI Platform
brew_tools-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.9 kB

Release files / brew_tools-0.6.0.tar.gz

Download URL brew_tools-0.6.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c487ab6c1a68a3d58feadd8d183da0356ea21b4109fc0d5ee61e7edd80a544a8
BLAKE2b-256 checksum
How to use checksums
dcc2f6dd2be3ee3d656ab40cbbc76c79eddb4b5d3d4b416a6d1cafb978d627a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Release files / brew_tools-0.6.0-py3-none-any.whl

Download URL brew_tools-0.6.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33485330a9683f70a3732518c43b646b3981a6b8517d896395fd20ed817145a8
BLAKE2b-256 checksum
How to use checksums
dc9b27a2bf27376bf64d0927a9792820244ea02673a91dbab729f5418c791838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page