Python client for WriftAI
Project description
The WriftAI Python Client provides convenient access to WriftAI's services. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.
Documentation
https://wrift.ai/docs/clients/python
Requirements
- Python 3.10+
Installation
pip install wriftai
Basic Usage
import os
from wriftai import Client
# Instantiate the WriftAI client
wriftai = Client(
# This is the default and can be omitted
access_token=os.environ.get("WRIFTAI_ACCESS_TOKEN"),
)
# Create a prediction against deepseek-ai/deepseek-r1 and wait for it to complete
prediction = wriftai.predictions.create(
model="deepseek-ai/deepseek-r1",
params={
"input": {
"prompt": "Summarize quantum computing.",
}
},
wait=True,
)
print(prediction.output)
# Quantum computing uses quantum bits to solve problems...
Using AsyncIO
The WriftAI Python client includes asyncio support powered by httpx. For convenience, every method also has an async_ prefixed variant.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Copyright (c) Sych Inc. All rights reserved.
Distributed under the terms of the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wriftai-0.22.1.tar.gz.
File metadata
- Download URL: wriftai-0.22.1.tar.gz
- Upload date:
- Size: 230.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa9bbdad903d8f1b234b60d5e314cd2d4c0d0f2d988096fc371355c996ed0088
|
|
| MD5 |
18b3669e93f9faa716026cd9e31552c2
|
|
| BLAKE2b-256 |
c004bada15d8e61cd7aaabfd2c37ca738c35dfd15952c69604320d00f6a4225f
|
File details
Details for the file wriftai-0.22.1-py3-none-any.whl.
File metadata
- Download URL: wriftai-0.22.1-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c9d4df1b4a9524a56e7421909443158e8a31050ce6bb3d1f5b41fa9b352e021
|
|
| MD5 |
ac79397cbabbba43b60a0e4beeb3b679
|
|
| BLAKE2b-256 |
09b26807d3f43a0f5f01a2c5630cbeaffc4a31bc4721eb7536774c56b938b6f1
|