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

73

u/Doormatty I get paid to write Python! Sep 04 '19

Fantastic job!

Took a quick look through the code, and it looks concise and self-explanatory!

I'd now recommend writing some tests, so you can be sure that when you refactor it (because you know you're going to want to), you can be sure it's still working correctly.

Again, awesome job!

Edit: Also love the website for it! I'm not a brewing person at all, but I could easily understand everything.

21

u/bmw2621 Sep 04 '19

Thanks for looking at it and giving feedback. "Add unit tests" will go on the TODO list.

12

u/Doormatty I get paid to write Python! Sep 04 '19

You might also want to add the Pycache directory to your .gitignore

5

u/bmw2621 Sep 04 '19

Yeah, it's in my .gitignore, I'm not sure why it's pushing. I still have to figure that out.

17

u/Taskenspiller Sep 04 '19

You probably pushed it once before adding it to the ignore file

13

u/AreYouADickhead Sep 04 '19

It's because it was most likely pushed to the repo prior to you adding it to the .gitignore. If you were to do git rm --cached pycache/ it should remove it from the repo

6

u/CalvinsStuffedTiger Sep 04 '19

Noob question. What does refactoring mean

3

u/jengl Sep 04 '19

Going back and reworking/improving your code.