Skip to content

Commit d825897

Browse files
committed
Adding Travis CI
1 parent 868f2ba commit d825897

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
install:
5+
- "pip install ."
6+
- "pip install -r requirements.txt"
7+
script:
8+
- python -m unittest discover -v

example.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,27 @@
1717
rows.append({'key': key, 'value': n, 'date': day.strftime("%Y-%m-%d")})
1818

1919
if insert_all(rows, token=TOKEN):
20-
print "Inserted", len(rows), "rows."
20+
print "Inserted", len(rows), "rows."
21+
22+
23+
from databox import Client
24+
25+
client = Client('<access token>')
26+
client.push('sales.total', 1447.0)
27+
client.push('orders.total', 32, date='2015-01-01 09:00:00')
28+
29+
print client.last_push()
30+
31+
client.insert_all([
32+
{'key': 'temp.boston', 'value': 51},
33+
{'key': 'temp.boston', 'value': 49, 'date': '2015-01-01 17:00:00'},
34+
{'key': 'sales.total', 'value': 3000},
35+
])
36+
37+
38+
39+
from databox import push, insert_all, last_push
40+
41+
token = '<access token>'
42+
push('sales.total', 1448.9, token=token)
43+
print last_push(token)

0 commit comments

Comments
 (0)