Skip to main content

DotAPI Python API library

The DotAPI Python library provides convenient access to the DotAPI REST API from any Python 3.7+ application.

Installation

pip install dotapi

Usage

from dotapi import OpenAI

client = OpenAI(
    api_key="My DotAPI Key",  # defaults to os.environ.get("DOTROUTER_API_KEY")
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Say this is a test",
        }
    ]
    # No need to pass model, dotapi will decide the best model for your query!
)

Metadata

Release files for dotapi 1.0.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 dotapi 1.0.0
File Size Uploaded
dotapi-1.0.0.tar.gz 185.1 kB Details

Built distribution (wheel)

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

Total release size: 507.0 kB

Release files / dotapi-1.0.0.tar.gz

Download URL dotapi-1.0.0.tar.gz
Size 185.1 kB
Tags Source
SHA-256 checksum
How to use checksums
26a53e8b4bcc4cd2c72815695d33cb597c7463bd66da646bc4c2af37c4c2841c
BLAKE2b-256 checksum
How to use checksums
366d0dc76d2a7a84cb3224920898b38fbd80b4114f64b16a67f980f916b94e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.2 Linux/6.6.32-02877-gde0d50d4a56c

Release files / dotapi-1.0.0-py3-none-any.whl

Download URL dotapi-1.0.0-py3-none-any.whl
Size 321.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53af01c440aa0eb44cb0b74d2e0a3ce30f39f5e11dbb138c2a46d082c1a33fb2
BLAKE2b-256 checksum
How to use checksums
9fc04078efb3447141838feffaea203f636191351b4764b64d07c434a5c2e5f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.2 Linux/6.6.32-02877-gde0d50d4a56c

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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