Quick Start

Get up and running with Observable Code in 60 seconds

Installation

Install the Observable Code Python package using pip:

pip install observable-code

1. Pair Your Phone

Run the setup command to create a session and get a QR code:

observable setup

This will:

  • Create a new session
  • Display a QR code in your terminal
  • Save your session ID to ~/.observable-code/config.json once you scan it

2. Add the Decorator

Import the package and add the @observable.track() decorator to any function:

import observable

@observable.track("daily_backup")
def run_backup():
    # your code here
    pass

3. Run Your Code

Execute your function and watch the event appear on your phone in real time. That's it!

What gets tracked?

The decorator automatically captures:

  • Status: completed or failed
  • Duration in milliseconds
  • On exception: error type and message (exception is re-raised)

Next Steps

Now that you have the basics working, check out:

  • API Reference - Learn about trace(), event(), and all available options
  • Examples - See real-world use cases and patterns