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.27.0.tar.gz (232.4 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.27.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wriftai-0.27.0.tar.gz
Algorithm Hash digest
SHA256 f96c2f40cd75b8e304c4183cfa010fcad62296481f76af991f1936d6562b64ac
MD5 1a5531550de304b0eb6429bb726f3fbe
BLAKE2b-256 c90c89037fca19d4804229c03c52d25de8a75d74391f984ddfbad64383870823

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wriftai-0.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3ed3b3d5553c80d890f89bdf90fca6bb92b2f96302785bc4808e62eeb3f8c2
MD5 c872437be5c7c654f9721d7b521d2962
BLAKE2b-256 dc9f15175f01c03ea3fad7b36d0dfcaa2b55db1455da949a3262c3d1a978a589

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