Skip to main content

litellm-datacircle

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website.

Our website: https://datacircle.dev

This package gives LiteLLM four tools that call Datacircle's open API, https://api.datacircle.dev/v1. You pass the four tools to litellm.completion(), on any provider LiteLLM supports. The package then runs each tool call the model returns. You need no key and no account.

Tool What the tool gives Call
datacircle_list_apis Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
datacircle_best_plans One API's plans, sorted by score out of 100, best first. Each plan comes with a rank and a price per 1,000 calls GET /apis/{slug}/best
datacircle_search_plans Plans that match a provider or plan name, on all APIs or on one API. You can sort them by score, provider or price GET /plans
datacircle_provider The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

pip install litellm-datacircle

litellm-datacircle works with any version of litellm, on Python 3.9 and later. The package does not import litellm.

Use the tools with run_tool_loop

LiteLLM 1.106 and later can run the whole tool loop. Pass our execute_tool function as the execute_tool argument:

import litellm
from litellm_datacircle import datacircle_tools, execute_tool

answer = litellm.run_tool_loop(
    model="anthropic/claude-haiku-5-5",
    messages=[{"role": "user", "content": "Who are the 3 best providers for the email-finder API?"}],
    tools=datacircle_tools(),
    execute_tool=execute_tool,
)
print(answer)

With litellm.arun_tool_loop, use aexecute_tool.

Use the tools in your own loop

Pass the tools to litellm.completion(). If the model calls a tool, call_all() gives you the tool messages to send back:

import litellm
from litellm_datacircle import call_all, datacircle_tools

messages = [{"role": "user", "content": "Who are the 3 best providers for the email-finder API?"}]
message = litellm.completion(model="openai/gpt-5-mini", messages=messages, tools=datacircle_tools()).choices[0].message

while message.tool_calls:
    messages.append(message)
    messages.extend(call_all(message))
    message = litellm.completion(model="openai/gpt-5-mini", messages=messages, tools=datacircle_tools()).choices[0].message

print(message.content)

Each tool is an OpenAI-format tool definition. LiteLLM turns each tool into the provider's own format. Each tool message has role: "tool", the call's id in tool_call_id, and the answer as JSON text in content.

With stream=True, build the reply with litellm.stream_chunk_builder(chunks, messages=messages). Then pass the reply's message to call_all(). With litellm.acompletion(), use await acall_all(...). acall_all() runs the calls at the same time. Your event loop keeps running.

Use the Datacircle tools beside your own tools

You can put the Datacircle tools in the same list as yours: tools=[*datacircle_tools(), my_tool].

With run_tool_loop, executor() runs the Datacircle tools and hands every other call to your own function:

answer = litellm.run_tool_loop(
    model="anthropic/claude-haiku-5-5",
    messages=messages,
    tools=[*datacircle_tools(), my_tool],
    execute_tool=executor(my_execute_tool),
)

With arun_tool_loop, use aexecutor(my_async_execute_tool).

In your own loop, call() runs one tool call. For your own tools, call() returns None. Your code then runs the tool itself:

from litellm_datacircle import call

for tool_call in message.tool_calls or []:
    messages.append(call(tool_call) or my_execute_tool(tool_call))

To give the model only some of the tools, list their names: datacircle_tools(["datacircle_best_plans"]).

Use the tools with litellm.responses

responses_tools() gives our four tools in the Responses API's format. call_outputs() gives the function_call_output items to send back:

import litellm
from litellm_datacircle import call_outputs, responses_tools

given = [{"role": "user", "content": "Who are the 3 best providers for the email-finder API?"}]
response = litellm.responses(model="anthropic/claude-haiku-5-5", input=given, tools=responses_tools())

while any(item.type == "function_call" for item in response.output):
    given += [item.model_dump(exclude_none=True) for item in response.output if item.type == "function_call"]
    given += call_outputs(response)
    response = litellm.responses(model="anthropic/claude-haiku-5-5", input=given, tools=responses_tools())

print(response.output[-1].content[0].text)

call_output() takes one item. call_output() returns None for a call to one of your own tools. With litellm.aresponses(), use await acall_outputs(...).

Call a tool yourself

You can call each tool without a model. You get the JSON text of the tool's answer:

import json

from litellm_datacircle import run

answer = json.loads(run("datacircle_best_plans", {"slug": "email-finder", "limit": 3}))
print(answer["plans"])

What the model reads

Each tool gives the model a JSON object as text. Each plan comes with a rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and a page on datacircle.dev. That page lists every field.

You can give a provider's name in place of a slug. The tool turns Bright Data into bright-data.

The tool returns {"error": "..."} with the API's message when the API gives no data, such as for an unknown slug. The error for an unknown API slug lists every valid slug. The tool checks each number from the model first. For a number out of range, the tool returns {"error": "..."} and makes no API call. If the network fails, the tool returns {"error": "..."} with the network error's message. The model can then call the tool again.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and nothing else. The request holds only the tool's own arguments: no key and nothing from your chats. The API takes up to 60 calls a minute from one IP address. The API can ask the tool to wait. The tool then waits once, for a minute at most. Each call uses only Python's standard library. Nothing goes to disk.

MIT license.

Metadata

Release files for litellm-datacircle 0.1.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 litellm-datacircle 0.1.0
File Size Uploaded Provenance Actions
litellm_datacircle-0.1.0.tar.gz 16.1 kB Without provenance Details for litellm_datacircle-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litellm-datacircle 0.1.0
File Interpreter ABI Platform Actions
litellm_datacircle-0.1.0-py3-none-any.whl Python 3 none any Details for litellm_datacircle-0.1.0-py3-none-any.whl

Total release size: 27.9 kB

Release files / litellm_datacircle-0.1.0.tar.gz

Download URL litellm_datacircle-0.1.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f5eee8fb6313da9c2f23ad4ce25b60944521b9adc7b33c3ae8296d02df68dfe8
BLAKE2b-256 checksum
How to use checksums
f8c866c100d1fb4da7cec96805d2258f14275e2ccbc659235ac5279d8a415e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / litellm_datacircle-0.1.0-py3-none-any.whl

Download URL litellm_datacircle-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
935796d0985b065cb1a5660fd1bc738e67ac80b08a21cf223f137b20c68e8f3f
BLAKE2b-256 checksum
How to use checksums
1d0062ae176ed0e577d7d394d1b5ef8ef92f858df2bf4962c578207dbf8dd7aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for litellm-datacircle 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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