Skip to main content

Python client for WriftAI

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wriftai-0.26.1.tar.gz (232.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wriftai-0.26.1-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file wriftai-0.26.1.tar.gz.

File metadata

  • Download URL: wriftai-0.26.1.tar.gz
  • Upload date:
  • Size: 232.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.14

File hashes

Hashes for wriftai-0.26.1.tar.gz
Algorithm Hash digest
SHA256 bebdb135187801714740942dd9f5ccdde0fc89f33fd98af42121222a0c7d06a9
MD5 c52fc3cc8004e02720f5b4f01d11b0d7
BLAKE2b-256 1cf9f4330f07a9e41d2e21c6cc62f77b4e1ed2d66a77d9cea3390c94020658cc

See more details on using hashes here.

File details

Details for the file wriftai-0.26.1-py3-none-any.whl.

File metadata

  • Download URL: wriftai-0.26.1-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.14

File hashes

Hashes for wriftai-0.26.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99ae4227a0b6fa339fd972dd83ab643c8dd17219cd03243fbc28d1e1c41a2471
MD5 461ad323f4778ac5cd7fedb43db15186
BLAKE2b-256 bcdf921ead1073e234f53e03d474843b18467bdfde391eeb6cc9ea01a64111ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page