Skip to main content

Python SDK Integration Best Practices

Last updated 1 min read

coolhand-python patches httpx and requests in the interpreter that imports it. That patch doesn't automatically exist in every worker process, survives fork() but not spawn(), and can interact with other instrumentation or logging setup. This guide covers the process-model and ordering pitfalls that leave Python integrations silently unmonitored.

Integrating the Coolhand Python SDK can be complex depending on your application's architecture. Factors such as your web framework, background job processing, and other instrumentation libraries can affect the SDK's ability to monitor your AI calls.

It is important to verify that the SDK is correctly intercepting your AI calls in your specific environment. We recommend thorough testing to ensure that your integration is working as expected.

For guidance on integrating our other SDKs, please see:

Related articles