Skip to main content

The Great Completo

Completo provides a unified interface for interacting with LLMs.

Work in progress

Completo is currently in active development. Current features include:

  • Synchronous and asynchronous interfaces
  • Switch engines mid-conversation
  • Streaming responses
  • Pydantic models
  • Tool use
  • Model Context Protocol servers for tools
  • Instructor integration
  • Backend support:
    • OpenAI
    • Anthropic
    • Gemini
    • Ollama

Installation

Use the completo package.

Currently targeting Python 3.13 only.

Usage

Simple interface

from completo import Completo

llm = Completo(default_engine=SyncOpenAIEngine(), default_model="o3-mini")

response = str(llm.complete("Hello, world!"))  # => "Hey, how can I help you today?"

Conversational interface

from completo import Completo, Conversation, UserMessage, DeveloperMessage, AssistantMessage

llm = Completo(default_engine=SyncOpenAIEngine(), default_model="o3-mini")

convo = Conversation()
convo.messages.append(DeveloperMessage(content="Respond in a single word"))  # Short-hand text content
convo.messages.append(UserMessage(content=[TextContent(text="What is the capital of France?")]))  # Fully-formed content

response = llm.complete(convo)

assert response.content[0].text == str(response) == "Paris"
assert isinstance(convo.messages[0], DeveloperMessage)
assert isinstance(convo.messages[1], UserMessage)
assert isinstance(convo.messages[2], AssistantMessage)

Async interfaces

from completo import AsyncCompleto

llm = AsyncCompleto(default_engine=AsyncAnthropicEngine(), default_model="claude-3-5-sonnet-latest")

response = await llm.complete("Hello, world!")

Streaming

from completo import Completo
from completo.models.completions import CompletionDelta

llm = Completo(default_engine=SyncOpenAIEngine(), default_model="o3-mini")

response = llm.complete("Hello, world!")

for completion in response.stream():
    assert isinstance(completion, CompletionDelta)
    print(completion.content[0].text)
    # => "Hey"
    # => ", "
    # => "how"
    # => " can I"
    # => "help"
    # => " you"
    # => "today?"

Async streaming

from completo import AsyncCompleto

llm = AsyncCompleto(default_engine=AsyncOpenAIEngine(), default_model="o3-mini")

response = await llm.complete("Hello, world!")

for completion in response.stream():
    assert isinstance(completion, CompletionDelta)
    print(completion.content[0].text)
    # => "Hey"
    # => ", "
    # => "how"
    # => " can I"
    # => "help"
    # => " you"
    # => "today?"

Switching engines

from completo import Completo

openai = SyncOpenAIEngine()
anthropic = SyncAnthropicEngine()

llm = Completo(default_engine=openai, default_model="o3-mini")

response = llm.complete("Which model are you executing on?")
print(response.content[0].text)  # => "o3-mini"

response = llm.complete("Which model are you executing on?", engine=anthropic, model="claude-3-5-sonnet-latest")
print(response.content[0].text)  # => "claude-3-5-sonnet-latest"

Metadata

Release files for completo 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for completo 0.0.10
File Size Uploaded Provenance
completo-0.0.10.tar.gz 152.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 166.6 kB

Release files / completo-0.0.10.tar.gz

Download URL completo-0.0.10.tar.gz
Size 152.2 kB
Tags Source
SHA-256 checksum
How to use checksums
92a92b1dbf6dbe7ec854a98e7d76bad89574ea2b7168f5d622de3e3500f164a5
BLAKE2b-256 checksum
How to use checksums
55f710f3dcfcadf7a7b9f8139fb9fdcfa02f8d823f8f57ed7fbd534f9dfa95a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

Release files / completo-0.0.10-py3-none-any.whl

Download URL completo-0.0.10-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
019311c2bd967e48115bd9aad3baaf23b8a43fb090383888916cb57c03ec4464
BLAKE2b-256 checksum
How to use checksums
4b633ef12ed37a6b3267fda3a0f168ca5cf551837134234935a7031cb9edff05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

Security for completo 0.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for completo-0.0.10.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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