@@ -28,6 +28,8 @@ Documentation for this Python client are available at the [Stream website](https
2828### Usage
2929
3030``` python
31+ import datetime
32+
3133# Instantiate a new client
3234import stream
3335client = stream.connect(' YOUR_API_KEY' , ' API_KEY_SECRET' )
@@ -116,15 +118,11 @@ client.activity_partial_update(id=activity_id, set=set, unset=unset)
116118# ...or by combination of foreign_id and time
117119client.activity_partial_update(foreign_id = foreign_id, time = activity_time, set = set , unset = unset)
118120
119- # Generating tokens for client side usage (JS client)
120- token = user_feed_1.token
121- # Javascript client side feed initialization
122- # user1 = client.feed('user', '1', '{{ token }}');
121+ # Generating user token for client side usage (JS client)
122+ user_token = client.create_user_token(" user-42" )
123123
124- # Generate a read-only token for client side usage (JS client)
125- readonly_token = user_feed_1.get_readonly_token()
126124# Javascript client side feed initialization
127- # user1 = client.feed('user', '1', '{{ readonly_token }}' );
125+ # client = stream.connect(apiKey, userToken, appId );
128126
129127# Generate a redirect url for the Stream Analytics platform to track
130128# events/impressions on url clicks
@@ -164,6 +162,15 @@ py.test --cov stream --cov-report html
164162LOCAL=true py.test
165163```
166164
165+ Install black and flake8
166+
167+ ```
168+ pip install black
169+ pip install flake8
170+ ```
171+
172+ Install git hooks to avoid pushing invalid code (git commit will run black and flak8)
173+
167174### Releasing a new version
168175
169176In order to release new version you need to be a maintainer on Pypi.
0 commit comments