Client
Class BaseClient
class BaseClient()
Base class for the Baserow client which handles the authentication and request session.
A JWT is needed when performing requests that are scoped to user interactions (e.g. operations that are expected to be run through the UI). A token should be used if only a subset of the Baserow API is used to create/read/write/delete rows.
Class BaserowClient
class BaserowClient(BaseClient)
Client for Baserow servers.
login
def login(username: str,
password: str,
cache: t.Union[bool, str] = False) -> User
A convenience method to log into Baserow using the specified username and password and updating the current client object. If cache is enabled or is a filename, it will be used to load a cached token for the Baserow URL and username combination to reuse a previously generated JWT. If the reused JWT is not valid anymore, the credentials will be used to generate a new one.
load
def load(username: str,
filename: t.Optional[str] = None,
raise_: bool = False,
refresh: bool = True) -> t.Optional[User]
Loads an existing JWT from the given filename or the DEFAULT_CREDENTIALS_FILE
. Returns True
if a token
was loaded, False
otherwise. If a token is loaded, it will be immediately refreshed.
save
def save(username: str, filename: t.Optional[str] = None) -> None
Saves the JWt of the client into filename or the given DEFAULT_CREDENTIALS_FILE
.