r/learnpython • u/bmw2621 • 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
425
Upvotes
r/learnpython • u/bmw2621 • Sep 04 '19
I would love any feedback. The API simply returns homebrewing calculations. I know there still a lot to do. Brew Numbers API
1
u/thegreattriscuit Sep 05 '19
Great work.
To provide an excuse to refactor (and thus further justification for the tests /u/Doormatty suggested):
The way you accept parameters is a bit odd to me. Totally valid, but *I* would like to call the API with named parameters like this:
http://18.216.248.93/all/no_correction?initialGrav=1.065&finalGrav=1.014Also my entire enterprise and the livelihoods of all 3000 of my employees depends on a 30 million line COBOL application I paid some college kids to write last summer, and *that* application depends on your API as it's currently implemented, so you can't break it. So maybe you should implement some versioning system, so users can decide which version of the API to call?