Proxy
An extensible embedded proxy client to multiple hosts.
Usage
Proxy()The default implementation provides load balancing based on active connections. It does not provide error handling or retrying.
Parameters
*urls: str-
base urls for requests
**kwargs- same options as Client
Methods
| Name | Description |
|---|---|
| choice() | Return chosen url according to priority. |
| priority() | Return comparable priority for url. |
| request() | Send request with relative or absolute path and return response. |
choice()
Return chosen url according to priority.
Usage
choice(method)Parameters
method: str- placeholder for extensions which distinguish read/write requests
priority()
Return comparable priority for url.
Usage
priority(url)Minimizes errors, failures (500s), and active connections. None may be used to eliminate from consideration.
request()
Send request with relative or absolute path and return response.
Usage
request(method, path, **kwargs)