Quickstart

Get ThinkingSDK running in your Python application in under 2 minutes.

Installation

pip install thinkingsdk

Requires Python 3.7 or later.

Initialize

import thinkingsdk as thinking

thinking.start(
    api_key="sk_live_your_api_key_here",
    server_url="https://api.thinkingsdk.ai",
    config={"git_repositories": ["https://github.com/your-org/your-repo"]}
)

That's it. ThinkingSDK now captures every unhandled exception in your application, in the main thread and in worker threads. Main thread crashes arrive with the stack trace, exception chain, system state, breadcrumb trail and repository context.

Get Your API Key

  1. Sign up at thinkingsdk.com/get-started
  2. Navigate to Settings → API Keys
  3. Create a new key: it starts with sk_live_

What Happens Next

When an exception occurs in your production code:

  1. Captured: SDK freezes the crash state (stack, exception chain, breadcrumbs, system info)
  2. Sent: Event is batched and sent to ThinkingSDK servers from a background thread (gzip compressed, non-blocking)
  3. Grouped: Repeats are aggregated by the SDK and grouped on the server
  4. Displayed: View the crash in your dashboard with the Time Capsule
  5. Fixed: If you're on a paid plan and set git_repositories, ThinkingSDK generates an AI fix and opens a PR

Verify It Works

import thinkingsdk as thinking

thinking.start(
    api_key="sk_live_your_key",
    server_url="https://api.thinkingsdk.ai"
)

# Trigger a test exception and leave it uncaught
def divide(a, b):
    return a / b

divide(1, 0)

The script exits with the usual ZeroDivisionError traceback and the SDK sends the report before the process exits. Check your dashboard: you should see a ZeroDivisionError within seconds. Wrapping the call in try/except reports nothing unless capture_caught_exceptions is on.

Next Steps