Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 4f97aae

Browse files
author
Donald Szeto
committed
Add PyPI installation and online doc site
1 parent e371674 commit 4f97aae

3 files changed

Lines changed: 37 additions & 10 deletions

File tree

README.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ PredictionIO Python SDK
44
Install
55
--------
66

7-
To install this predictionio package, run,
7+
To install the module from PyPI, you may
88

9-
% python setup.py install
9+
$ pip install predictionio
10+
11+
or
12+
13+
$ easy_install predictionio
14+
15+
If you have cloned the repository and want to install directly from there,
16+
do the following in the root directory of the repository:
17+
18+
$ python setup.py install
19+
20+
This will install the "predictionio" module to your Python distribution.
1021

1122
Usage
1223
-----
@@ -15,11 +26,13 @@ To use predictionio in your Python script,
1526

1627
>>> import predictionio
1728

18-
1929
Documentation
2030
-------------
2131

22-
Please install Sphinx (http://sphinx-doc.org/install.html) if you do not have it.
32+
The latest documentation is located at http://pythonhosted.org/PredictionIO/
33+
34+
If you want to build a local copy, please install Sphinx
35+
(http://sphinx-doc.org/install.html).
2336

2437
To generate documentation,
2538

docs/source/index.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,31 @@ Overview
77
Installation
88
------------
99

10-
Go to the containing directory PredictionIO-Python-SDK/lib and execute the following::
10+
To install the module from PyPI, you may
1111

12-
$ python setup.py install
12+
::
1313

14-
This will install the predictionio Python-SDK package into the corresponding package directory.
14+
$ pip install predictionio
15+
16+
or
17+
18+
::
19+
20+
$ easy_install predictionio
21+
22+
If you have cloned the repository and want to install directly from there,
23+
do the following in the root directory of the repository::
24+
25+
$ python setup.py install
26+
27+
This will install the ``predictionio`` module to your Python distribution.
1528

1629

1730
Usage
18-
-------------
31+
-----
1932

20-
To start using this Python SDK, simply import the installed predictionio package in your Python environment::
33+
To start using this Python SDK, simply import the ``predictionio`` module in
34+
your Python program::
2135

2236
>>> import predictionio
2337

docs/source/predictionio.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Error Handling
4141
An exception will be raised when an error occur during the request. Please refer to the documentation of the :class:`predictionio.Client` class for details.
4242
In general, you may want to catch the exception and decide what to do with the error (such as logging it).
4343

44-
For example, the method :meth:`~Client.user_rate_item` may raise U2IActionNotCreatedError.
44+
For example, the method :meth:`~Client.user_rate_item` may raise ``U2IActionNotCreatedError``.
4545

4646
>>> try:
4747
>>> client.user_rate_item(uid="100", iid="200", rate=2)

0 commit comments

Comments
 (0)