Quickstart (Python SDK)
5 min
when you create a new account, the account creation flow will automatically guide you through the process of creating your first trace alternatively, you can use these quickstart steps 1\) get api key create abv account create abv account create new api credentials in the project settings 2\) ingest your first trace install package pip install abvdev add credentials add your abv credentials to your environment variables make sure that you have a env file in your project root env abv api key = "sk abv " abv host = "https //app abv dev" # us region \# abv host = "https //eu app abv dev" # eu region there are three main ways of creating traces with the python sdk observe decorator (easiest) the @observe decorator is the simplest way to instrument your application it is a function decorator that can be applied to any function it sets the current span in the context for automatic nesting of child spans and automatically ends it when the function returns it also automatically captures the function name, arguments, and r eturn value from abvdev import observe, get client @observe def my function() return "hello, world!" # input/output and timings are automatically captured my function() \# flush events in short lived applications abv = get client() abv flush() context managers (recommended) context managers are the recommended way to instrument chunks of work in your application as they automatically handle the start and end of spans, and set the current span in the context for automatic nesting of child spans they provide more control than the @observe decorator from abvdev import get client abv = get client() \# create a span using a context manager with abv start as current span(name="process request") as span \# your processing logic here span update(output="processing complete") \# create a nested generation for an llm call with abv start as current generation(name="llm response", model="gpt 5 2025 08 07") as generation \# your llm call logic here generation update(output="generated response") \# all spans are automatically closed when exiting their context blocks \# flush events in short lived applications abv flush()