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.30.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.30.0
File Size Uploaded
wriftai-0.30.0.tar.gz 258.9 kB Details

Built distribution (wheel)

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

Total release size: 291.7 kB

Release files / wriftai-0.30.0.tar.gz

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

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

Download URL wriftai-0.30.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2ef2f40219a5fafc5a8b4b52f7dc195867dfcf6530c73a1a26cb6745b651c4d
BLAKE2b-256 checksum
How to use checksums
e4ad518346bbb4c6930bdffe1a096cc803f9acad8c08051aad67a0010f849626
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