A brief description of your package
Project description
PrefAI Python Library
The PrefAI Python Library enables applications coded in Python to interface with the PrefAI API.
Installation
Install with:
pip install prefai
Usage
The library needs an API key, which you get on your pref.ai developer account.
export PREFAI_API_KEY=<YOUR_SECRET_KEY>
We can now add a user record like this:
import os
from prefai import prefai_client
prefai_client.api_key = os.getenv("PREFAI_API_KEY")
test_user_email = os.getenv("PREFAI_TEST_USER_EMAIL")
# Add record
prefai_client.add_record(
user_email = "test@pref.ai",
user_action = "What's a spicy appetizer you'd recommend for a BBQ with 6 people?",
)
For more information and next steps, read the quickstart.
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
prefai-0.0.5.tar.gz
(4.5 kB
view details)
File details
Details for the file prefai-0.0.5.tar.gz.
File metadata
- Download URL: prefai-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4d4589b48e1dbeed2f757726860686fe4982bc475696f286746211f7bb1c73c
|
|
| MD5 |
d2b187da5195688de6366ddd8615c76b
|
|
| BLAKE2b-256 |
9a50862d0eb9df198fbcb404f43560c42eeaef911d7525b3b4d4ed73c94780c9
|