Skip to main content API

Project description

A Python package for accessing the API.


Copyright 2015 9165584 Canada Corporation <>

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


You can get this library by forking it from our Github repository:

git clone

After that, you can just use regular stuff to set it up.


It uses pytest. However, you need to have a API key to make it work. You can get one by going to:

The test script (not the SDK itself!) looks for the API key in the FUZZY_IO_KEY environment variable. So you can run the test something like this:

FUZZY_IO_KEY=<yourkeyhere> python -m pytest

Basic usage

When you use the fuzzyio module, you always have to provide your API key first. Use the setup() function to do that:

import fuzzyio


To have a agent make a decision for you, use the evaluate() function of the fuzzyio module:

from __future__ import print_function

agent_id = "AGENTIDHERE"

inputs = {
  "height": 188
  "weight": 88.7

outputs = fuzzyio.evaluate(agent_id, inputs)

print outputs["run_distance"]

If you need to provide feedback on the evaluation, use the evaluate_with_id() function to get an ID for the evaluation, and then provide that to the feedback() function:

agent_id = "AGENTIDHERE"

inputs = {
  "height": 188
  "weight": 88.7

(outputs, evaluation_id) = fuzzyio.evaluate_with_id(agent_id, inputs)

# Real-world usage of the run_distance will return some performance
# metric., {"weight_loss": 0.25})

Advanced usage

All of the API is available through this SDK.

The Agent class represents a single agent. It includes evaluate() and evaluate_with_id() methods as well as save() and delete() to change the agent on the server. Use that last part carefully!

The Evaluation class represents a single evaluation. It includes a get() method to fetch details about the evaluation and the feedback() method to fetch feedback on the evaluation.

The Feedback class represents a single feedback data point. It has a save() method to generate feedback for an evaluation.

See also

You can submit issues or make pull requests on Github.

Thanks for using

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuzzyio-0.2.0.dev0.tar.gz (5.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page