@@ -12,23 +12,24 @@ When in Databox Designer go to Account > Access tokens, then either create a new
1212
1313## Using the Databox Python library
1414
15- from databox import PushClient
16-
17- # instantiate PushClient
18- client = PushClient('<access token>')
19-
20- # push metric "answer1" with value 42 for today
21- client.add(42, "answer1")
22-
23- # push metric "answer1" with value 42 for any other day
24- client.add(42, "answer1", "2015-05-01 10:10:10")
25-
26- # send to Databox
27- print client.send()
28-
29- # get last push
30- print client.lastPush()
15+ ``` python
16+ from databox import PushClient
3117
18+ # instantiate PushClient
19+ client = PushClient(' <access token>' )
20+
21+ # push metric "answer1" with value 42 for today
22+ client.add(42 , " answer1" )
23+
24+ # push metric "answer1" with value 42 for any other day
25+ client.add(42 , " answer1" , " 2015-05-01 10:10:10" )
26+
27+ # send to Databox
28+ print client.send()
29+
30+ # get last push
31+ print client.lastPush()
32+ ``
3233
3334Check working sample in [sample1.py](/ sample1.py) file .
3435
@@ -37,6 +38,9 @@ Check working sample in [sample1.py](/sample1.py) file.
3738 mkvirtualenv -- no- site- packages databox- python
3839 workon databox- python
3940 pip install -- upgrade - r requirements.txt
41+
42+ # Running test suite
43+ python - munittest discover - p - t . ' test*' - v
4044
4145# # Authors and contributions
4246
0 commit comments