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.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.31.0
File Size Uploaded
wriftai-0.31.0.tar.gz 262.9 kB Details

Built distribution (wheel)

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

Total release size: 297.2 kB

Release files / wriftai-0.31.0.tar.gz

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

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

Download URL wriftai-0.31.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4acec2e611f590a8dfa47944cf23a2a32de9b3c0cbe586cfc560526ff262466
BLAKE2b-256 checksum
How to use checksums
d9012537478765079fde9ee1f0dcf943ad0b0289014d143fded38ccd4c3f37be
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