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.28.0.tar.gz (241.9 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.28.0-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wriftai-0.28.0.tar.gz
Algorithm Hash digest
SHA256 0ea380a087537b3f60acfb717c2ee66dc2f330a32ccac77336452398b6c05018
MD5 64a41461ad3b11423317d17df28fd40e
BLAKE2b-256 d42be6aeb6dbbb7e664165073181188eeb004538fa4add7f274c8bd1fb829d6a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wriftai-0.28.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcce790dbc3a4da5e8ad1f79b72b13b8263a4cd18c64bddaeb4639c0f12f0b02
MD5 8b8baa53060fa8d0f0d34099bd8960b8
BLAKE2b-256 a8624f95ae63f7bf8a24533ba1739a8e8500e4d09391e80e852d82543dcc83df

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