Skip to content
Python client library for the Openscoring REST web service
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
openscoring Updated Openscoring dependency Feb 19, 2019
.gitignore Added a unit test Nov 16, 2015
LICENSE.txt Import Nov 9, 2015 Import Nov 9, 2015 Updated Openscoring dependency Feb 19, 2019
setup.cfg Registered 'openscoring' package with PyPI Feb 19, 2019


Python client library for the Openscoring REST web service.


  • Python 2.7, 3.4 or newer.


Install the latest version from GitHub:

pip install --user --upgrade git+


Creating an Openscoring object:

from openscoring import Openscoring

os = Openscoring("http://localhost:8080/openscoring")

Deploying a PMML document DecisionTreeIris.pmml as an Iris model:

# A dictionary of user-specified parameters
kwargs = {"auth" : ("admin", "adminadmin")}

os.deployFile("Iris", "DecisionTreeIris.pmml", **kwargs)

Evaluating the Iris model with a data record:

arguments = {
	"Sepal.Length" : 5.1,
	"Sepal.Width" : 3.5,
	"Petal.Length" : 1.4,
	"Petal.Width" : 0.2

results = os.evaluate("Iris", arguments)

The same, but wrapping the data record into an EvaluationRequest object for request identification purposes:

from openscoring import EvaluationRequest

evaluationRequest = EvaluationRequest("record-001", arguments)

evaluationResponse = os.evaluate("Iris", evaluationRequest)

Evaluating the Iris model with data records from the Iris.csv CSV file, storing the results to the Iris-results CSV file:

os.evaluateCsvFile("Iris", "Iris.csv", "Iris-results.csv")

Undeploying the Iris model:

os.undeploy("Iris", **kwargs)



pip uninstall openscoring


Openscoring-Python is dual-licensed under the GNU Affero General Public License (AGPL) version 3.0, and a commercial license.

Additional information

Openscoring-Python is developed and maintained by Openscoring Ltd, Estonia.

Interested in using Openscoring software in your application? Please contact

You can’t perform that action at this time.