Skip to main content

RudderStack is an open-source Segment alternative written in Go, built for the enterprise.

Project description

RudderStack Python SDK

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rudder_sdk_python-2.1.4.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

rudder_sdk_python-2.1.4-py2.py3-none-any.whl (19.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file rudder_sdk_python-2.1.4.tar.gz.

File metadata

  • Download URL: rudder_sdk_python-2.1.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rudder_sdk_python-2.1.4.tar.gz
Algorithm Hash digest
SHA256 c6040044d79df05973cdec3f4455c7619b2b54b03158c68adca990e6502e1815
MD5 f78ca43d2a675f57a68b42a154df8de0
BLAKE2b-256 ec3021675cadc1731dbb03d4e98b74852a63e0b4c063092cf2342c49b8b02b30

See more details on using hashes here.

File details

Details for the file rudder_sdk_python-2.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for rudder_sdk_python-2.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a9891944ec4947ae0aea5962560cadf726f55831855993ebfb9c7acbdabb8ebb
MD5 bc5cdca98f211ef5bd4c4cf16e2b0e38
BLAKE2b-256 bf4ba6e3ae5b57dc2fef23b86a742955eff94a3bbe1682e5ee783e3b631eacb6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page