Closed skalish closed 3 years ago
What about something like:
session: tc.Session = tc.session.make(instance=i, auth=a)
where tc.Session
is a dataclass
:
@dataclass(frozen=true)
class Session:
_session: requests.Session
auth: requests.AuthThingy
instance: tc.Instance
Or with monkey-patching:
def __init__(self):
self._session.request = our request function?
:tada: This PR is included in version 1.4.0 :tada:
The release is available on:
v1.4.0
Your semantic-release bot :package::rocket:
↪️ Pull Request
This PR adds the capability to fetch and store Tamr auth cookies to reuse sessions and limit the necessary number of calls to the Tamr auth service.
For TC, auth cookie fetching is done automatically whenever a request is made to the Tamr server and a valid cookie is not already stored.
For TUC, an auth cookie is fetched when a
Client
is created with thestore_auth_cookie
parameter set toTrue
. It isFalse
by default. An existingClient
without an auth cookie can be manually directed to fetch one with the method.set_auth_cookie()
.Closes #305
💻 Examples
✔️ PR Todo