Skip to main content

Overview

Django is a modern web framework for building APIs with Python 3.6+ based on standard Python type hints. Langtrace can be easily integrated with Django applications with the help of the Langtrace SDK.

Steps

Follow the steps below to integrate Langtrace with your Django application:
  • Install the Langtrace SDK. Initialize django project and add this inside the init.py file, for the sake of example we added the following lines in settings.py file.
This is a sample views.py file that uses the Langtrace SDK to call the OpenAI API:
Python