Module betterstack.uptime.auth
This module will handle the BearerAuth mechanism used by Betterstack
Module contents
Authentication handlers for the BetterStack API.
- class betterstack.uptime.auth.BearerAuth(token: str)[source]
Bases:
AuthBaseBearer token authentication for requests.
This class implements the requests AuthBase interface to automatically add Bearer token authentication to all requests.
- Example:
>>> auth = BearerAuth("your-api-token") >>> requests.get("https://api.example.com", auth=auth)
Initialize BearerAuth with a token.
- Args:
token: The bearer token to use for authentication.