Skip to main content

RudderStack

RudderStack Python SDK

Ask DeepWiki

RudderStack’s Python SDK lets you track events from your Python application. Once enabled, the event requests hit the RudderStack servers. RudderStack then transforms and routes these events to your specified destination platforms.

More details on the Python SDK can be found in our documentation

Getting Started with Python SDK

Install rudder-sdk-python using pip:

pip install rudder-sdk-python

Initializing the RudderStack Client

import rudderstack.analytics as analytics

analytics.write_key = <SOURCE_WRITE_KEY>
analytics.on_error = <FAILURE CALLBACK>
analytics.debug = <True or False>
analytics.dataPlaneUrl = <RUDDERSTACK_DATA_PLANE_URL>

analytics.gzip = <True or False>

Sending Events

Once the RudderStack client is initialized, you can use it to send your customer events. A sample track call is shown below:

rudder_analytics.track('developer_user_id', 'Simple Track Event', {
  'key1': 'val1'
})
analytics.track('user_id', 'Simple Track Event', anonymous_id='anonymousId',
  properties={
  'key1': 'val1'
}, context={
  'key1': 'val1'
})

For more information on the supported calls, refer to the documentation.

Proxy configuration

Pass proxies when you create a Client. A Requests-style mapping is preferred:

from rudderstack.analytics.client import Client

client = Client(
    'SOURCE_WRITE_KEY',
    host='https://YOUR_DATA_PLANE_URL',
    proxies={
        'http': 'http://proxy.example:8080',
        'https': 'http://proxy.example:8080',
    },
)

A legacy string such as proxy.example:8080 is also supported. The SDK applies the string to both HTTP and HTTPS requests. If the string has no scheme, the SDK adds http://. An existing scheme is preserved.

Configured proxies are now used for event requests. Earlier versions ignored this option. Check that any existing proxy configuration is reachable before upgrading.

About RudderStack

RudderStack is a customer data platform for developers. Our tooling makes it easy to deploy pipelines that collect customer data from every app, website and SaaS platform, then activate it in your warehouse and business tools.

More information on RudderStack can be found here.

Contact Us

For more information on any of the sections covered in this readme, you can contact us or start a conversation on our Slack channel.

Metadata

Release files for rudder-sdk-python 2.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rudder-sdk-python 2.1.9
File Size Uploaded
rudder_sdk_python-2.1.9.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rudder-sdk-python 2.1.9
File Interpreter ABI Platform
rudder_sdk_python-2.1.9-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 46.5 kB

Release files / rudder_sdk_python-2.1.9.tar.gz

Download URL rudder_sdk_python-2.1.9.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a236e13fce62884db1eb78bcccd36f4c7976b6ccd1bdfd242a0f7ee3f8225f14
BLAKE2b-256 checksum
How to use checksums
9ba527c77549f944909d9d7e896580abe9a578625e530486b621748c6bf9cbc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / rudder_sdk_python-2.1.9-py2.py3-none-any.whl

Download URL rudder_sdk_python-2.1.9-py2.py3-none-any.whl
Size 26.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1dc5af0b3556163feb708f514a59c5fa0c9d92a5b796d068cf0f5bd770278a2b
BLAKE2b-256 checksum
How to use checksums
4c53727046db950fddabd44819e04323ab4b9be175d9b95d3ae1a54be8a78233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.9 This release

2 release files

2.1.8

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page