Skip to main content
WriftAI Banner

WriftAI Python Client

Docs · Issues

CI PyPI - Version License

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",
    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.

Release files for wriftai 0.31.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wriftai 0.31.1
File Size Uploaded
wriftai-0.31.1.tar.gz 262.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wriftai 0.31.1
File Interpreter ABI Platform
wriftai-0.31.1-py3-none-any.whl Python 3 none any Details

Total release size: 297.2 kB

Release files / wriftai-0.31.1.tar.gz

Download URL wriftai-0.31.1.tar.gz
Size 262.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cbe059c0ba0274417359c30f9e1a38366bc96b22bf290bd282fb59f12d692aa1
BLAKE2b-256 checksum
How to use checksums
6e14d0581673df777323474a00b3298285e664127211a905b74b5076beb2844a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Release files / wriftai-0.31.1-py3-none-any.whl

Download URL wriftai-0.31.1-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8b44e6ec13c45cff52677e544102098caed7f23bd4af1173ee55d74d83a6b0f
BLAKE2b-256 checksum
How to use checksums
b2269bf4da52abb34e1e84f44246d9ebefb2b623f578429f0953c62ade6a187e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page