Docs Navigation

Python

You can use fuzzy.ai from your Python project using the Open Source library.

Installation

You can download the software at: https://github.com/fuzzy-ai/python

You can also fork the repository on Github.

Testing

Testing uses tox and supports py27, py33, py34, py35 and pypy.

To run for a single version:

tox -e py27

Basic usage

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

from fuzzyai.client import Client

client = Client(YOUR_API_KEY)

To have a Fuzzy.ai agent make a decision for you, use the evaluate() function of the fuzzyai module:

agent_id = "AGENTIDHERE"

inputs = dict(height=188, weight=88.7)

(outputs, evaluation_id) = client.evaluate(agent_id, inputs)

# Real-world usage of the run_distance will return some performance
# metric.

client.feedback(evaluation_id, dict(weight_loss=0.25))