Skip to content

Commit

Permalink
feat: update python version (#274)
Browse files Browse the repository at this point in the history
* update python version
  • Loading branch information
cpacm authored Dec 26, 2023
1 parent b2c658e commit c0edd85
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/server/Python SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ title: Python SDK
### 版本记录
| 版本 | 说明 | 日期 |
|:-------:| :----: | :-------: |
| V1.0.5 | 修复消息事件中 DataSourceId 参数错误的问题,维度表上报时删除多余参数 | 2023-12-01 |
| V1.0.2 | 支持埋点事件事件变量、用户变量可传列表类型 | 2022-04-20 |
| V1.0.1 | 支持埋点事件可传eventTime参数 | 2022-04-02 |
| V1.0.0 | 支持自定义事件,用户属性事件 | 2022-03-28 |
Expand Down Expand Up @@ -246,6 +247,16 @@ from growingio_tracker_protobuf import ProtobufParser

if __name__ == '__main__':

def tracker():
buffer_consumer = BufferedConsumer('bc675c65b3b0290e', '939c0b26233d3ed1', 'http://uat-api.growingio.com')
growing_tracker = GrowingTracker.consumer(buffer_consumer)
message = CustomEventMessage.EventBuilder() \
.set_event_name("tracker_consumer").set_attributes({'num': 3}).set_anonymous_id('python') \
.build()
growing_tracker.track(message)
buffer_consumer.flush()
time.sleep(5)

def tracker_consumer():
buffer_consumer = BufferedConsumer('<product_id>', '<data_source_id>', '<server_host>')
growing_tracker = GrowingTracker.consumer(buffer_consumer)
Expand Down Expand Up @@ -330,7 +341,7 @@ if __name__ == '__main__':

time.sleep(15)


tracker()
tracker_test()
tracker_user()
tracker_consumer()
Expand Down

0 comments on commit c0edd85

Please sign in to comment.