@@ -28,6 +28,8 @@ Documentation for this Python client are available at the [Stream website](https
28
28
### Usage
29
29
30
30
``` python
31
+ import datetime
32
+
31
33
# Instantiate a new client
32
34
import stream
33
35
client = stream.connect(' YOUR_API_KEY' , ' API_KEY_SECRET' )
@@ -116,15 +118,11 @@ client.activity_partial_update(id=activity_id, set=set, unset=unset)
116
118
# ...or by combination of foreign_id and time
117
119
client.activity_partial_update(foreign_id = foreign_id, time = activity_time, set = set , unset = unset)
118
120
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" )
123
123
124
- # Generate a read-only token for client side usage (JS client)
125
- readonly_token = user_feed_1.get_readonly_token()
126
124
# Javascript client side feed initialization
127
- # user1 = client.feed('user', '1', '{{ readonly_token }}' );
125
+ # client = stream.connect(apiKey, userToken, appId );
128
126
129
127
# Generate a redirect url for the Stream Analytics platform to track
130
128
# events/impressions on url clicks
@@ -164,6 +162,15 @@ py.test --cov stream --cov-report html
164
162
LOCAL=true py.test
165
163
```
166
164
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
+
167
174
### Releasing a new version
168
175
169
176
In order to release new version you need to be a maintainer on Pypi.
0 commit comments