Initialize TogglPy and set your API Key
masterTo use TogglPy, you must instantiate the Toggl class and provide your Toggl API key using the setAPIKey method. This key is used in the request headers for all subsequent API calls. You can also customize the User-Agent header using setUserAgent.
from toggl.TogglPy import Toggl
toggl = Toggl()
toggl.setAPIKey('YOUR_API_KEY')
# Optional: set a custom user agent
toggl.setUserAgent('MyCustomAgent/1.0')