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.29.0

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.29.0
File Size Uploaded
wriftai-0.29.0.tar.gz 242.8 kB Details

Built distribution (wheel)

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

Total release size: 271.1 kB

Release files / wriftai-0.29.0.tar.gz

Download URL wriftai-0.29.0.tar.gz
Size 242.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9ee38cd9a66ba7c20e8b40bee2949cf6009ebc02dadddfa764898d842354e391
BLAKE2b-256 checksum
How to use checksums
c7516fd0a4b76f367ee6593b9e3c06fd4423228b62dbd7afb854a7b491f9f02d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

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

Download URL wriftai-0.29.0-py3-none-any.whl
Size 28.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9a1e2c0a3462b85ff101bd78395eb338ff02de65fde284846d1788063f3cb2f
BLAKE2b-256 checksum
How to use checksums
ca79a7ebd5dda470e9d9d2efca5c98d1f99768ef98a006d003344b4d5046f849
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