Backend Setup: Python
This guide walks you through instrumenting a Python application with the SF Veritas SDK
Installation
Install the SF Veritas package:
pip install sf-veritas
Or with poetry:
poetry add sf-veritas
Basic Setup
Add the following to your application's entry point. The key is to wrap the initialization in a development check so it only runs during local development:
import os
# Initialize SF Veritas ONLY in development mode
if os.environ.get('DEBUG') == 'true':
from sf_veritas import setup_interceptors
setup_interceptors(
api_key='sf-vscode-extension',
graphql_endpoint='http://localhost:6776/graphql/',
service_identifier='my-python-service',
service_version='1.0.0',
)
# Your application code continues below...