RudderStack's Python SDK (`rudder-sdk-python`) is an open-source client for tracking and sending server-side customer event data from Python applications. It acts as an open-source Segment alternative, enabling developers to collect and route event data to various downstream destinations. The library is currently at version 2.1.4 and is actively maintained with regular updates.
pip install rudder-sdk-pythonVerified import paths — ran on the pinned version, not inferred.
Initialize the RudderStack Python SDK with your source write key and data plane URL, then use `identify`, `track`, and `page` methods to send customer events. Remember to call `flush()` to ensure all buffered events are sent before your application exits.
Always pass `user_id` or `anonymous_id` as an argument to event methods: `rudder_analytics.track('user_id_123', 'Event Name')`.Consider using asynchronous processing (e.g., a background thread, a message queue, or a dedicated worker) for RudderStack event calls in performance-sensitive applications.
Monitor event sizes and truncate or restructure large event payloads to stay within the 32KB limit. Split large events into multiple smaller events if necessary.
1. Verify your `rudder_analytics.write_key` and `rudder_analytics.dataPlaneUrl` are correct. 2. Check the status of your RudderStack server/data plane (if self-hosted) or the RudderStack cloud dashboard. 3. Confirm the destination is enabled and configured correctly in your RudderStack workspace. 4. Enable `rudder_analytics.debug = True` for more verbose logging.
1. Check your network connection and proxy settings. 2. Ensure the `DATA_PLANE_URL` is accessible from your application's environment. 3. Verify that any firewalls are configured to allow outbound HTTP/HTTPS connections to your data plane URL. 4. Increase the `timeout` configuration option for the SDK if transient network issues are expected.
1. Check the status of your destination service (e.g., Google Analytics, S3). 2. If self-hosting RudderStack, monitor your server resources and consider scaling up if the incoming event rate consistently exceeds processing capacity. 3. Review RudderStack dashboard metrics for any alerts on pending events or degraded performance.
No dependency data recorded yet.