Skip to content

Commit c8dda1a

Browse files
author
Kenneth Chan
committed
Update for 0.9.2
1 parent 0d7ee77 commit c8dda1a

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

docs/source/predictionio.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ predictionio.AsyncRequest Class
5959
predictionio.FileExporter Class
6060
-------------------------------
6161

62+
.. versionadded:: 0.9.2
6263
.. autoclass:: FileExporter
6364
:members:
64-
65+
6566

6667
predictionio SDK Usage Notes
6768
-------------------------
@@ -89,8 +90,7 @@ This allows you to do other work between these two steps.
8990
In some cases you may not care whether the request is successful for performance or application-specific reasons, then you can simply skip step 2.
9091

9192
.. note::
92-
If you do care about the request status or need to get the return data, then at a later time you will need to call :meth:`~Client.aresp` with the AsyncRequest object returned in step 1.
93-
Please refer to the documentation of :ref:`asynchronous request methods <async-methods-label>` for more details.
93+
If you do care about the request status or need to get the return data, then at a later time you will need to call :meth:`~AsyncRequest.get_response` with the AsyncRequest object returned in step 1.
9494

9595
For example, the following code first generates an asynchronous request to
9696
retrieve recommendations, then get the result at later time::
@@ -135,6 +135,8 @@ Alternatively, you can use blocking requests to import large amount of data, but
135135
Batch Import Data with FileExporter and "pio import"
136136
^^^^^^^^^^^^^^^^^^^^^^^
137137

138+
.. versionadded:: 0.9.2
139+
138140
You can use FileExporter to create events and write to a JSON file which can
139141
be used by "pio import". Pleas see `Importing Data in Batch <http://docs.prediction.io/datacollection/batchimport/>`_ for more details.
140142

predictionio/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77

8-
__version__ = "0.8.3"
8+
__version__ = "0.9.2"
99

1010
# import deprecated libraries.
1111
from predictionio.obsolete import Client
@@ -489,7 +489,7 @@ def send_query(self, data):
489489
return self.asend_query(data).get_response()
490490

491491
class FileExporter(object):
492-
"""File exporter to export events to JSON file for batch import
492+
"""File exporter to write events to JSON file for batch import
493493
494494
:param file_name: the destination file name
495495
"""
@@ -502,7 +502,11 @@ def __init__(self, file_name):
502502
def create_event(self, event, entity_type, entity_id,
503503
target_entity_type=None, target_entity_id=None, properties=None,
504504
event_time=None):
505-
"""write event to the file"""
505+
"""Create an event and write to the file.
506+
507+
(please refer to EventClient's create_event())
508+
509+
"""
506510
data = {
507511
"event": event,
508512
"entityType": entity_type,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='PredictionIO',
13-
version="0.8.3",
13+
version="0.9.2",
1414
author=__author__,
1515
author_email=__email__,
1616
packages=['predictionio'],

0 commit comments

Comments
 (0)