You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I have been thinking about this library and I think I'd like to make the output functions a little more usable. I had the following ideas:
Build Class definitions for URLs where the route is totally common but there are different methods, something like this:
class SomeRoute:
def __init__(self):
self.url = "some/url/{param1}/etc"
pass
def get(self, param1):
return requests.get(self.url.format(param1=param1))
def post(self, param1, payload):
etc.
Instead of (or in addition to) the above, we could also separate functions into modules so that you can do something like dotted function call:
import some_url_client
some_url_client.get()
The default way of naming functions creates really long functions, so we need something consistent that also creates an API that's not ultimately painful to use.
I'll experiment and try to see what'll work best.
The text was updated successfully, but these errors were encountered:
So, I have been thinking about this library and I think I'd like to make the output functions a little more usable. I had the following ideas:
The default way of naming functions creates really long functions, so we need something consistent that also creates an API that's not ultimately painful to use.
I'll experiment and try to see what'll work best.
The text was updated successfully, but these errors were encountered: