File tree Expand file tree Collapse file tree 6 files changed +30
-14
lines changed Expand file tree Collapse file tree 6 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 1
1
language : python
2
2
python :
3
- - " 2.7"
4
- - " 3.6"
3
+ - ' 2.7'
4
+ - ' 3.6'
5
5
install :
6
- - pip install .
7
- - pip install pyyaml
8
- # command to run tests
6
+ - pip install .
7
+ - pip install pyyaml
9
8
script :
10
- - python run_tests.py
9
+ - python run_tests.py
10
+ deploy :
11
+ provider : pypi
12
+ user : worvast
13
+ password :
14
+ secure : J3YPGEaDHD1H9pVQscrh4J2U18ptq8pM5UsjIKGe6WGlgiTMhR+WYRcdQSFIGSyKZMkdnLavSuvImcUzBSL6L3WqarRZ6HBgGXtxxHRVNmk96ZZlBN5qq0AUJzHN61x5JbG+OWzJMZE1HDo6zcD36KvaIAfKu3AyaEYeVes54PY5cLC/JH/HooOP0FS643kbttkiTYKmEajJiCgu/SiXH5dtfuz5GO0CXrEp0ww+FtcTmC9T9txyjS+IBIvbNPHJC9M5jg6bgu214fCIr5iGNZ8LQulRskBOsqhCRbyyWjuF0wgl3Dkefa0z3YJpl2KYHYW0bT0UY2J8WXnE66NT6js2sv/mNdcRAZjjzugcr9mr11FrLazIjNJwDwlSTtuNoys4E449wQZfQ4vUsUANwnsXQJAdujANS8O2Yuk65uIlgnNpYBxXI71OPYZ6dzhDOsAcwlUrS9jZi2+UWGtOXoZX3i3qLWwBHEASXNSN2WLZOVj3lTEyBB7WCbBqDANHCRLrkyHMrUkOP9ptE7lvATCVfHIO2axsaxNJRKHI6W53p+6uMRAt9u0LIKBB4hyZMo51j7xkq6uO4cQt2CINVU24gYajcalswtJ/Cr0onj26xx2g/xq19sU1L7rpp8OZGFnLPHptxV3ezTlhdk86ZfwOQI1TC4KPAQlRZARDeSk=
15
+ on :
16
+ tags : true
Original file line number Diff line number Diff line change @@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
- ## [ 1.5.0]
7
+
8
+ ## [ 1.5.1] - 2018-12-28
9
+ #### Fixed
10
+ * devo.common buffer now receive data when CSV response
11
+ * devo.common buffer.is_empty
12
+
13
+ #### Added
14
+ * Travis CI deploy automatic options
15
+
16
+ ## [ 1.5.0] - 2018-12-27
8
17
#### Changed
9
18
* Modify Configuration loads functions
10
19
* Now Sender send, send_raw, flush_buffer and fill_buffer return the number of lines sent
@@ -13,7 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
13
22
* Problems when loads configuration from default sites
14
23
* Problems with local_server
15
24
16
- ## [ 1.4.0]
25
+ ## [ 1.4.0] - 2018-12-17
17
26
#### Added
18
27
* Allow the parameters user, application name and comment to queries
19
28
* Add tests (test_pragmas and test_pragmas test_pragmas_not_comment_free) in the query.py file.
Original file line number Diff line number Diff line change 1
1
2
2
[ ![ master Build Status] ( https://travis-ci.com/DevoInc/python-sdk.svg?branch=master )] ( https://travis-ci.com/DevoInc/python-sdk ) [ ![ LICENSE] ( https://img.shields.io/dub/l/vibe-d.svg )] ( https://github.com/DevoInc/python-sdk/blob/master/LICENSE )
3
3
4
- [ ![ wheel] ( https://img.shields.io/badge/wheel-yes-brightgreen.svg )] ( https://pypi.org/project/devo-sdk/ ) [ ![ version] ( https://img.shields.io/badge/version-1.5.0 -blue.svg )] ( https://pypi.org/project/devo-sdk/ ) [ ![ python] ( https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg )] ( https://pypi.org/project/devo-sdk/ )
4
+ [ ![ wheel] ( https://img.shields.io/badge/wheel-yes-brightgreen.svg )] ( https://pypi.org/project/devo-sdk/ ) [ ![ version] ( https://img.shields.io/badge/version-1.5.1 -blue.svg )] ( https://pypi.org/project/devo-sdk/ ) [ ![ python] ( https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg )] ( https://pypi.org/project/devo-sdk/ )
5
5
6
6
7
7
# Devo Python SDK
Original file line number Diff line number Diff line change 1
1
__description__ = 'Devo Python Library.'
2
2
__url__ = 'http://www.devo.com'
3
- __version__ = "1.5.0 "
3
+ __version__ = "1.5.1 "
4
4
__author__ = 'Devo'
5
5
__author_email__ = 'support@devo.com'
6
6
__license__ = 'MIT'
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ def query(self, **kwargs):
194
194
self .connect ()
195
195
196
196
if self .buffer is None :
197
- self .buffer = Buffer ()
197
+ self .buffer = Buffer (api_response = opts [ 'response' ] )
198
198
self .buffer .create_thread (
199
199
target = self ._call_stream ,
200
200
kwargs = ({'payload' : self ._get_payload (query , query_id ,
Original file line number Diff line number Diff line change @@ -15,13 +15,14 @@ class DevoBufferException(Exception):
15
15
16
16
class Buffer (object ):
17
17
""" Simple Buffer class """
18
- def __init__ (self , buffer_max_size = 1000 ):
18
+ def __init__ (self , buffer_max_size = 1000 , api_response = "json/compact" ):
19
19
self .queue = Queue .Queue (maxsize = buffer_max_size )
20
20
self .thread = None
21
21
self .temp = None
22
22
self .error = None
23
23
self .close = False
24
24
self .timeout = 0
25
+ self .response_split = "\n " if api_response is "csv" else "\r \n "
25
26
26
27
def is_alive (self ):
27
28
return self .thread .isAlive ()
@@ -30,7 +31,7 @@ def set_timeout(self, timeout):
30
31
self .timeout = timeout
31
32
32
33
def is_empty (self ):
33
- return True if self .size () > 0 else False
34
+ return True if self .size () < 0 else False
34
35
35
36
def create_thread (self , target , kwargs ):
36
37
""" Function for create one separate thread for Queue"""
@@ -77,7 +78,7 @@ def proccess_recv(self, data):
77
78
if not isinstance (data , str ):
78
79
data = data .decode ('utf8' )
79
80
80
- data = data [data .find ("\r \n " ) + 2 :].split (" \r \n " )
81
+ data = data [data .find ("\r \n " ) + 2 :].split (self . response_split )
81
82
82
83
data_len = len (data )
83
84
if self .temp is not None :
You can’t perform that action at this time.
0 commit comments