Skip to main content

Recommendation service API

Project description

Reze

A Python client for easy use of the Reze recommendation API.

If you don't have an account at Reze yet, you can create a free account here

Installation

Install the client with pip:

pip install reze

(use pip3 instead of pip if you use Python 3)

Examples

# import
from reze.api_client import RezeClient
from reze.api_requests import SalebotAddInteraction, SalebotBoughtTogether, SalebotItemsToItem

app_id = "your_app_id"
app_key = "your_key"
server_url = "current_reze_api_server"

client = RezeClient(app_id, app_key, server_url)

# Send the data to Reze
request_add_interaction = SalebotAddInteraction(1, "tag_content", 1, "VIEW")
print(client.send(request_add_interaction))

# Get recommendations
request_bought_together = SalebotBoughtTogether("bô")
recommended_bought_together = client.send(request_bought_together)
print("Bought together items: ")
for tag in recommended_bought_together['data']:
    print(tag['tag'])

# Get recommendations
request_items_to_item = SalebotItemsToItem("bô")
recommended_items_to_item = client.send(request_items_to_item)
print("Recommended items to item: ")
for tag in recommended_items_to_item['data']:
    print(tag['tag'])

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

reze-0.2.tar.gz (2.9 kB view hashes)

Uploaded source

Built Distribution

reze-0.2-py3-none-any.whl (4.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page