r/learnpython • • Sep 04 '19

Wrote my first API

I would love any feedback. The API simply returns homebrewing calculations. I know there still a lot to do. Brew Numbers API

Github Repo

425 Upvotes

44 comments sorted by

View all comments

4

u/[deleted] Sep 04 '19 edited Aug 30 '25

[removed] — view removed comment

2

u/bmw2621 Sep 04 '19

Your the second to mention Black formatter. I'll be researching it. How do you suggest fixing imports (I'm tracking importing * is bad juju, but I'm sticking with it for now as long as all my formulas fit in one file.

Numbers aren't magical they are published my Dr. Michael Hall in the article I cite at the top of the formulas.py, README.md, and the first paragraph of the documentation site linked above.

Thanks for the feedback, I'll fix my PEP8 violations.

2

u/Metaroxy Sep 04 '19

When /u/lanemik said that the numbers are "super magical" I'm sure the intention was not to imply that you came up with them. Rather that the code does not document what they are. So if you declare each number as a constant and then use that named constant in your formula, it will be clearer what it does and self-documenting.