Skip to main content

Python SDK overview

The Python SDK is an asynchronous, typed client generated from the public Analog WakaTime OpenAPI contract. It uses httpx and Pydantic response models.

This documentation is intentionally isolated from other language clients. The Go SDK lives beside Python under the common SDK section without duplicating the HTTP API reference.

Requirements

  • Python 3.10 or newer
  • an active Analog WakaTime account
  • an active personal API token beginning with analog-wakatime_live_, or a session JWT

Production API

The generated production SDK uses the server declared by OpenAPI:

https://api.testingmyproject.space

No manual host value is needed for production.

Minimal request

import Analog_WakaTime_SDK
import asyncio
import os


async def main() -> None:
configuration = Analog_WakaTime_SDK.Configuration(
access_token=os.environ["ANALOG_WAKATIME_API_TOKEN"],
)

async with Analog_WakaTime_SDK.ApiClient(configuration) as api_client:
profile_api = Analog_WakaTime_SDK.ProfileApi(api_client)
profile = await profile_api.main_api_v1_get_my_profile_info_get()
print(profile.to_dict())


if __name__ == "__main__":
asyncio.run(main())

Pass only the raw token to access_token. The SDK adds Authorization: Bearer automatically.

Documentation sections