Skip to main content

an abstraction layer for the stormheron mead-calc API

Project description

Stormheron Mead-Calculator

Installation

This package can be installed with pip: pip install stormheron-mead-calc

Examples

Solve for ABV given Sugar and Final-Gravity

from mead import Sugar, SugarType, Recipe

if __name__ == '__main__':
    recipe = Recipe(batch_volume_gal=5,
                    yan_offset=0,
                    yeast_gram_per_gal=2,
                    sna_step_count=3,
                    nutrition_need=0.9,
                    yeast_abv_pct=30,
                    goferm_ppm_per_g=132,
                    ferm_k_ppm_per_g=177,
                    dap_ppm_per_g=210,
                    ferm_o_ppm_per_g=160,
                    goferm_max_gpl=1.32,
                    ferm_k_max_gpl=0.5,
                    dap_max_gpl=0.96,
                    ferm_o_max_gpl=2,
                    final_gravity_pct=1.05,
                    sugar_loads=[
                        Sugar(sugar_type=SugarType(name="Sugar", sugar_content=1.0), qty_lbs=30.34)
                    ])

    results = recipe.calculate()

    print(results)

Solve for Sugar given ABV and Final-Gravity

from mead import Sugar, SugarType, Recipe

if __name__ == '__main__':
    recipe = Recipe(batch_volume_gal=5,
                    yan_offset=0,
                    yeast_gram_per_gal=2,
                    sna_step_count=3,
                    nutrition_need=0.9,
                    yeast_abv_pct=30,
                    goferm_ppm_per_g=132,
                    ferm_k_ppm_per_g=177,
                    dap_ppm_per_g=210,
                    ferm_o_ppm_per_g=160,
                    goferm_max_gpl=1.32,
                    ferm_k_max_gpl=0.5,
                    dap_max_gpl=0.96,
                    ferm_o_max_gpl=2,
                    final_gravity_pct=1.05,
                    abv_pct=0.87)

    results = recipe.calculate()

    print(results)

Solve for Final-Gravity given Sugar and ABV

from mead import Sugar, SugarType, Recipe

if __name__ == '__main__':
    recipe = Recipe(batch_volume_gal=5,
                    yan_offset=0,
                    yeast_gram_per_gal=2,
                    sna_step_count=3,
                    nutrition_need=0.9,
                    yeast_abv_pct=30,
                    goferm_ppm_per_g=132,
                    ferm_k_ppm_per_g=177,
                    dap_ppm_per_g=210,
                    ferm_o_ppm_per_g=160,
                    goferm_max_gpl=1.32,
                    ferm_k_max_gpl=0.5,
                    dap_max_gpl=0.96,
                    ferm_o_max_gpl=2,
                    abv_pct=0.87,
                    sugar_loads=[
                        Sugar(sugar_type=SugarType(name="Sugar", sugar_content=1.0), qty_lbs=30.34)
                    ])

    results = recipe.calculate()

    print(results)

Updating the PyPi package

Packaging Python Projects

  1. make sure you have the latest versions of twine, setuptools, and wheel installed
    pip install --upgrade setuptools twine wheel
  2. !!! Adjust the version in setup.py appropriately !!!
  3. build the package by running this command from the same directory where setup.py is located
    setup.py sdist bdist_wheel
  4. deploy the package by running this command from the same directory where setup.py is located twine upload --repository pypi dist/*
    • this step requires a valid PyPi account

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stormheron-mead-calc-0.2.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

stormheron_mead_calc-0.2-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page