Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.2.4] - 2019-04-25
#### Fixed
* Fixed multiline sending introduced in version 1.3.0

## [2.2.3] - 2019-04-22
#### Fixed
* Fixed bug in Sender CLI introduced in version 2.2.2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[![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)

[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-2.2.3-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/)
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-2.2.4-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/)


# Devo Python SDK
Expand Down
2 changes: 1 addition & 1 deletion devo/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__description__ = 'Devo Python Library.'
__url__ = 'http://www.devo.com'
__version__ = "2.2.3"
__version__ = "2.2.4"
__author__ = 'Devo'
__author_email__ = '[email protected]'
__license__ = 'MIT'
Expand Down
10 changes: 9 additions & 1 deletion devo/sender/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ def close(self):
self.socket.close()
self.socket = None

@staticmethod
def __encode_multiline(record):
try:
record = Sender.__encode_record(record)
return b'%d %s' % (len(record), record)
except Exception as error:
raise DevoSenderException(error)

@staticmethod
def __encode_record(record):
"""
Expand Down Expand Up @@ -312,7 +320,7 @@ def send_raw(self, record, multiline=False, zipped=False):
sent = self.socket.send(self.__encode_record(record))
return 1
if multiline:
record = self.__encode_record(record)
record = self.__encode_multiline(record)

sent = self.__send_oc(record)
if sent:
Expand Down
10 changes: 5 additions & 5 deletions docs/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This library performs queries to the Client API (Search rest api) of Devo.
## Endpoints
##### API
To perform a request with API, first choose the required endpoint depending on the region your are accessing from:
* **USA:** https://api-us.devo.com/search/query
* **EU:** https://api-eu.devo.com/search/query
* **USA:** https://apiv2-us.devo.com/search/query
* **EU:** https://apiv2-eu.devo.com/search/query

You have more information in the official documentation of Devo, [REST API v2](https://docs.devo.com/confluence/ndt/api-reference/rest-api-v2) .

Expand All @@ -19,9 +19,9 @@ You have more information in the official documentation of Devo, [REST API v2](h
- jwt: JWT token
- url(optional): The url of the service. A static constants are provided with
the commons clouds: can take several values, for example:
- Client.URL_AWS_EU: https://api-eu.logtrust.com
- Client.URL_AWS_USA: https://api-us.logtrust.com
- Client.URL_VDC: https://spainapi.logtrust.com
- Client.URL_AWS_EU: https://apiv2-eu.devo.com
- Client.URL_AWS_USA: https://apiv2-us.devo.com
- Client.URL_VDC: https://spainapi.devo.com
- Client.URL_QUERY_COMPLEMENT = '/search/query'
- buffer (optional): Buffer object if you modify the Devo Buffer class

Expand Down