rudder-sdk-python 2.1.1__tar.gz → 2.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. rudder_sdk_python-2.1.3/PKG-INFO +90 -0
  2. rudder_sdk_python-2.1.3/rudder_sdk_python.egg-info/PKG-INFO +90 -0
  3. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudder_sdk_python.egg-info/SOURCES.txt +1 -0
  4. rudder_sdk_python-2.1.3/rudder_sdk_python.egg-info/not-zip-safe +1 -0
  5. rudder_sdk_python-2.1.3/rudder_sdk_python.egg-info/requires.txt +10 -0
  6. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/consumer.py +0 -1
  7. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/request.py +0 -1
  8. rudder_sdk_python-2.1.3/rudderstack/analytics/version.py +1 -0
  9. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/setup.cfg +1 -1
  10. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/setup.py +22 -26
  11. rudder-sdk-python-2.1.1/PKG-INFO +0 -29
  12. rudder-sdk-python-2.1.1/rudder_sdk_python.egg-info/PKG-INFO +0 -29
  13. rudder-sdk-python-2.1.1/rudder_sdk_python.egg-info/requires.txt +0 -11
  14. rudder-sdk-python-2.1.1/rudderstack/analytics/version.py +0 -1
  15. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/LICENSE.md +0 -0
  16. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/README.md +0 -0
  17. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudder_sdk_python.egg-info/dependency_links.txt +0 -0
  18. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudder_sdk_python.egg-info/top_level.txt +0 -0
  19. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/__init__.py +0 -0
  20. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/client.py +0 -0
  21. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/get_env.py +0 -0
  22. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/__init__.py +0 -0
  23. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_client.py +0 -0
  24. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_constants.py +0 -0
  25. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_consumer.py +0 -0
  26. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_module.py +0 -0
  27. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_request.py +0 -0
  28. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/test/test_utils.py +0 -0
  29. {rudder-sdk-python-2.1.1 → rudder_sdk_python-2.1.3}/rudderstack/analytics/utils.py +0 -0
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: rudder-sdk-python
3
+ Version: 2.1.3
4
+ Summary: RudderStack is an open-source Segment alternative written in Go, built for the enterprise.
5
+ Home-page: https://github.com/rudderlabs/rudder-sdk-python
6
+ Author: RudderStack
7
+ Author-email: sdk@rudderstack.com
8
+ Maintainer: RudderStack
9
+ Maintainer-email: sdk@rudderstack.com
10
+ License: MIT License
11
+ Keywords: rudder,rudderstack,analytics
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.8.0
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE.md
27
+ Requires-Dist: requests<3.0,>=2.32.3
28
+ Requires-Dist: monotonic<2.0,>=1.6
29
+ Requires-Dist: backoff<3.0,>=2.2.1
30
+ Requires-Dist: python-dateutil<3.0,>=2.2
31
+ Requires-Dist: python-dotenv<2.0.0,>=1.0.1
32
+ Requires-Dist: deprecation<3.0.0,>=2.1.0
33
+ Provides-Extra: test
34
+ Requires-Dist: mock==4.0.3; extra == "test"
35
+ Requires-Dist: flake8==7.1.0; extra == "test"
36
+
37
+ # RudderStack Python SDK
38
+
39
+ 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.
40
+
41
+ More details on the Python SDK can be found in our [**documentation**](https://docs.rudderstack.com/stream-sources/rudderstack-sdk-integration-guides/rudderstack-python-sdk)
42
+
43
+ ## Getting Started with Python SDK
44
+
45
+ Install `rudder-sdk-python` using `pip`:
46
+
47
+ ```bash
48
+ pip install rudder-sdk-python
49
+ ```
50
+
51
+ ## Initializing the RudderStack Client
52
+
53
+ ```python
54
+ import rudderstack.analytics as analytics
55
+
56
+ analytics.write_key = <SOURCE_WRITE_KEY>
57
+ analytics.on_error = <FAILURE CALLBACK>
58
+ analytics.debug = <True or False>
59
+ analytics.dataPlaneUrl = <RUDDERSTACK_DATA_PLANE_URL>
60
+
61
+ analytics.gzip = <True or False>
62
+ ```
63
+
64
+ ## Sending Events
65
+
66
+ Once the RudderStack client is initialized, you can use it to send your customer events. A sample `track` call is shown below:
67
+
68
+ ```python
69
+ rudder_analytics.track('developer_user_id', 'Simple Track Event', {
70
+ 'key1': 'val1'
71
+ })
72
+ analytics.track('user_id', 'Simple Track Event', anonymous_id='anonymousId',
73
+ properties={
74
+ 'key1': 'val1'
75
+ }, context={
76
+ 'key1': 'val1'
77
+ })
78
+ ```
79
+
80
+ For more information on the supported calls, refer to the [**documentation**](https://docs.rudderstack.com/stream-sources/rudderstack-sdk-integration-guides/rudderstack-python-sdk#sending-events-from-rudderstack).
81
+
82
+ ## About RudderStack
83
+
84
+ [**RudderStack**](https://rudderstack.com/) 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.
85
+
86
+ More information on RudderStack can be found [**here**](https://github.com/rudderlabs/rudder-server).
87
+
88
+ ## Contact Us
89
+
90
+ For more information on any of the sections covered in this readme, you can [**contact us**](mailto:%20docs@rudderstack.com) or start a conversation on our [**Slack**](https://resources.rudderstack.com/join-rudderstack-slack) channel.
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: rudder-sdk-python
3
+ Version: 2.1.3
4
+ Summary: RudderStack is an open-source Segment alternative written in Go, built for the enterprise.
5
+ Home-page: https://github.com/rudderlabs/rudder-sdk-python
6
+ Author: RudderStack
7
+ Author-email: sdk@rudderstack.com
8
+ Maintainer: RudderStack
9
+ Maintainer-email: sdk@rudderstack.com
10
+ License: MIT License
11
+ Keywords: rudder,rudderstack,analytics
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.8.0
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE.md
27
+ Requires-Dist: requests<3.0,>=2.32.3
28
+ Requires-Dist: monotonic<2.0,>=1.6
29
+ Requires-Dist: backoff<3.0,>=2.2.1
30
+ Requires-Dist: python-dateutil<3.0,>=2.2
31
+ Requires-Dist: python-dotenv<2.0.0,>=1.0.1
32
+ Requires-Dist: deprecation<3.0.0,>=2.1.0
33
+ Provides-Extra: test
34
+ Requires-Dist: mock==4.0.3; extra == "test"
35
+ Requires-Dist: flake8==7.1.0; extra == "test"
36
+
37
+ # RudderStack Python SDK
38
+
39
+ 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.
40
+
41
+ More details on the Python SDK can be found in our [**documentation**](https://docs.rudderstack.com/stream-sources/rudderstack-sdk-integration-guides/rudderstack-python-sdk)
42
+
43
+ ## Getting Started with Python SDK
44
+
45
+ Install `rudder-sdk-python` using `pip`:
46
+
47
+ ```bash
48
+ pip install rudder-sdk-python
49
+ ```
50
+
51
+ ## Initializing the RudderStack Client
52
+
53
+ ```python
54
+ import rudderstack.analytics as analytics
55
+
56
+ analytics.write_key = <SOURCE_WRITE_KEY>
57
+ analytics.on_error = <FAILURE CALLBACK>
58
+ analytics.debug = <True or False>
59
+ analytics.dataPlaneUrl = <RUDDERSTACK_DATA_PLANE_URL>
60
+
61
+ analytics.gzip = <True or False>
62
+ ```
63
+
64
+ ## Sending Events
65
+
66
+ Once the RudderStack client is initialized, you can use it to send your customer events. A sample `track` call is shown below:
67
+
68
+ ```python
69
+ rudder_analytics.track('developer_user_id', 'Simple Track Event', {
70
+ 'key1': 'val1'
71
+ })
72
+ analytics.track('user_id', 'Simple Track Event', anonymous_id='anonymousId',
73
+ properties={
74
+ 'key1': 'val1'
75
+ }, context={
76
+ 'key1': 'val1'
77
+ })
78
+ ```
79
+
80
+ For more information on the supported calls, refer to the [**documentation**](https://docs.rudderstack.com/stream-sources/rudderstack-sdk-integration-guides/rudderstack-python-sdk#sending-events-from-rudderstack).
81
+
82
+ ## About RudderStack
83
+
84
+ [**RudderStack**](https://rudderstack.com/) 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.
85
+
86
+ More information on RudderStack can be found [**here**](https://github.com/rudderlabs/rudder-server).
87
+
88
+ ## Contact Us
89
+
90
+ For more information on any of the sections covered in this readme, you can [**contact us**](mailto:%20docs@rudderstack.com) or start a conversation on our [**Slack**](https://resources.rudderstack.com/join-rudderstack-slack) channel.
@@ -5,6 +5,7 @@ setup.py
5
5
  rudder_sdk_python.egg-info/PKG-INFO
6
6
  rudder_sdk_python.egg-info/SOURCES.txt
7
7
  rudder_sdk_python.egg-info/dependency_links.txt
8
+ rudder_sdk_python.egg-info/not-zip-safe
8
9
  rudder_sdk_python.egg-info/requires.txt
9
10
  rudder_sdk_python.egg-info/top_level.txt
10
11
  rudderstack/analytics/__init__.py
@@ -0,0 +1,10 @@
1
+ requests<3.0,>=2.32.3
2
+ monotonic<2.0,>=1.6
3
+ backoff<3.0,>=2.2.1
4
+ python-dateutil<3.0,>=2.2
5
+ python-dotenv<2.0.0,>=1.0.1
6
+ deprecation<3.0.0,>=2.1.0
7
+
8
+ [test]
9
+ mock==4.0.3
10
+ flake8==7.1.0
@@ -120,7 +120,6 @@ class Consumer(Thread):
120
120
  return (400 <= exc.status < 500) and exc.status != 429
121
121
  else:
122
122
  # retry on all other errors (eg. network)
123
- print("error: ", exc)
124
123
  return False
125
124
 
126
125
  @backoff.on_exception(
@@ -44,7 +44,6 @@ def post(write_key, host=None, gzip=True, timeout=15, proxies=None, **kwargs):
44
44
  headers=headers, timeout=timeout)
45
45
 
46
46
  if res.status_code == 200:
47
- print("success")
48
47
  log.debug('data uploaded successfully')
49
48
  return res
50
49
 
@@ -0,0 +1 @@
1
+ VERSION = '2.1.3'
@@ -2,7 +2,7 @@
2
2
  universal = 1
3
3
 
4
4
  [metadata]
5
- description-file = README.md
5
+ description_file = README.md
6
6
 
7
7
  [egg_info]
8
8
  tag_build =
@@ -1,48 +1,38 @@
1
- import os
2
1
  import sys
3
-
4
- try:
5
- from setuptools import setup
6
- except ImportError:
7
- from distutils.core import setup
2
+ from setuptools import setup
3
+ from pathlib import Path
8
4
 
9
5
  # Don't import rudder_analytics module here, since deps may not be installed
10
- sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'rudderstack', 'analytics'))
6
+ sys.path.insert(0, str(Path(__file__).resolve().parent / 'rudderstack' / 'analytics'))
11
7
  from rudderstack.analytics.version import VERSION
12
8
 
13
- long_description = '''
14
- RudderStack is a platform for collecting, storing and routing customer event data to dozens
15
- of tools. RudderStack is open-source, can run in your cloud environment
16
- (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation
17
- framework to process your event data on the fly.
18
- '''
9
+ long_description = (Path(__file__).resolve().parent / 'README.md').read_text(encoding='utf-8')
19
10
 
20
11
  install_requires = [
21
- "requests>=2.8,<3.0",
22
- "monotonic>=1.5,<2.0",
23
- "backoff>=2.1,<3.0",
12
+ "requests>=2.32.3,<3.0",
13
+ "monotonic>=1.6,<2.0",
14
+ "backoff>=2.2.1,<3.0",
24
15
  "python-dateutil>=2.2,<3.0",
25
- "python-dotenv>=0.21.0,<2.0.0",
26
- "deprecation>=2.0.6,<3.0.0",
16
+ "python-dotenv>=1.0.1,<2.0.0",
17
+ "deprecation>=2.1.0,<3.0.0",
27
18
  ]
28
19
 
29
20
  tests_require = [
30
- "mock==2.0.0",
31
- "pylint==2.8.0",
32
- "flake8==3.7.9",
21
+ "mock==4.0.3",
22
+ "flake8==7.1.0",
33
23
  ]
34
24
 
35
25
  setup(
36
26
  name='rudder-sdk-python',
37
27
  version=VERSION,
38
28
  url='https://github.com/rudderlabs/rudder-sdk-python',
39
- author='Rudderstack',
29
+ author='RudderStack',
40
30
  author_email='sdk@rudderstack.com',
41
- maintainer='Rudderstack',
31
+ maintainer='RudderStack',
42
32
  maintainer_email='sdk@rudderstack.com',
43
33
  test_suite='rudderstack.analytics.test.all',
44
34
  packages=['rudderstack.analytics', 'rudderstack.analytics.test'],
45
- python_requires='>=3.6.0',
35
+ python_requires='>=3.8.0',
46
36
  license='MIT License',
47
37
  install_requires=install_requires,
48
38
  keywords=['rudder', 'rudderstack', 'analytics'],
@@ -51,15 +41,21 @@ setup(
51
41
  },
52
42
  description='RudderStack is an open-source Segment alternative written in Go, built for the enterprise.',
53
43
  long_description=long_description,
44
+ long_description_content_type='text/markdown',
54
45
  classifiers=[
55
46
  "Development Status :: 5 - Production/Stable",
56
47
  "Intended Audience :: Developers",
57
48
  "License :: OSI Approved :: MIT License",
58
49
  "Operating System :: OS Independent",
59
50
  "Programming Language :: Python",
60
- "Programming Language :: Python :: 3.6",
61
- "Programming Language :: Python :: 3.7",
51
+ "Programming Language :: Python :: 3",
62
52
  "Programming Language :: Python :: 3.8",
63
53
  "Programming Language :: Python :: 3.9",
54
+ "Programming Language :: Python :: 3.10",
55
+ "Programming Language :: Python :: 3.11",
56
+ "Programming Language :: Python :: 3.12",
57
+ "Topic :: Software Development :: Libraries :: Python Modules",
64
58
  ],
59
+ zip_safe=False,
60
+ include_package_data=True,
65
61
  )
@@ -1,29 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: rudder-sdk-python
3
- Version: 2.1.1
4
- Summary: RudderStack is an open-source Segment alternative written in Go, built for the enterprise.
5
- Home-page: https://github.com/rudderlabs/rudder-sdk-python
6
- Author: Rudderstack
7
- Author-email: sdk@rudderstack.com
8
- Maintainer: Rudderstack
9
- Maintainer-email: sdk@rudderstack.com
10
- License: MIT License
11
- Keywords: rudder,rudderstack,analytics
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python
17
- Classifier: Programming Language :: Python :: 3.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Classifier: Programming Language :: Python :: 3.8
20
- Classifier: Programming Language :: Python :: 3.9
21
- Requires-Python: >=3.6.0
22
- Provides-Extra: test
23
- License-File: LICENSE.md
24
-
25
-
26
- RudderStack is a platform for collecting, storing and routing customer event data to dozens
27
- of tools. RudderStack is open-source, can run in your cloud environment
28
- (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation
29
- framework to process your event data on the fly.
@@ -1,29 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: rudder-sdk-python
3
- Version: 2.1.1
4
- Summary: RudderStack is an open-source Segment alternative written in Go, built for the enterprise.
5
- Home-page: https://github.com/rudderlabs/rudder-sdk-python
6
- Author: Rudderstack
7
- Author-email: sdk@rudderstack.com
8
- Maintainer: Rudderstack
9
- Maintainer-email: sdk@rudderstack.com
10
- License: MIT License
11
- Keywords: rudder,rudderstack,analytics
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python
17
- Classifier: Programming Language :: Python :: 3.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Classifier: Programming Language :: Python :: 3.8
20
- Classifier: Programming Language :: Python :: 3.9
21
- Requires-Python: >=3.6.0
22
- Provides-Extra: test
23
- License-File: LICENSE.md
24
-
25
-
26
- RudderStack is a platform for collecting, storing and routing customer event data to dozens
27
- of tools. RudderStack is open-source, can run in your cloud environment
28
- (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation
29
- framework to process your event data on the fly.
@@ -1,11 +0,0 @@
1
- requests<3.0,>=2.8
2
- monotonic<2.0,>=1.5
3
- backoff<3.0,>=2.1
4
- python-dateutil<3.0,>=2.2
5
- python-dotenv<2.0.0,>=0.21.0
6
- deprecation<3.0.0,>=2.0.6
7
-
8
- [test]
9
- mock==2.0.0
10
- pylint==2.8.0
11
- flake8==3.7.9
@@ -1 +0,0 @@
1
- VERSION = '2.1.1'