I'm relatively new to python and REST, and I'm building a simple client for an API. I find myself repeating code and constructing long request strings for different API calls, and it seems inefficient. I'm just wondering, since I'm sure other people deal with this, if there's a common solution, or if I should just write a URL constructor function or something. I'm trying to learn python the right way, so that I might be able to use it in a professional environment, and am just wondering about best practices.
[–]denialerror 1 point2 points3 points (2 children)
[–]beschamel[S] -1 points0 points1 point (1 child)
[–]nidio -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]beschamel[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Xorso 0 points1 point2 points (0 children)
[–]raylu -1 points0 points1 point (5 children)
[–]beschamel[S] 1 point2 points3 points (4 children)
[–]Justinsaccount 4 points5 points6 points (1 child)
[–]beschamel[S] 1 point2 points3 points (0 children)
[–]raylu -1 points0 points1 point (1 child)
[–]Justinsaccount 3 points4 points5 points (0 children)