bubbuild/republic
bubbuild/republic has 84 GitHub stars and 23 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and +1 in 15 days. Last checked 2026-11-15 07:19 UTC. Last push 2026-11-02.
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
A Python library for AI providers.
Developer ToolsREADME.md
OriginalRepublic
One Python interface for chat, streaming, tool calls, and structured output across AI providers. Republic stops at providers; agent loops, tool execution, and gateways stay in your code.
Quickstart
Republic requires Python 3.11 or later.
python -m pip install republic
export REPUBLIC_OPENAI_API_KEY="your-api-key"
import asyncio
import republic
from republic.events import TextDelta
async def main():
model = republic.get_model("openai:gpt-6-sol")
response = await model.chat("Explain a tool call in one sentence.")
print(response.text)
async with model.stream("Explain how an agent uses a tool result.") as stream:
async for event in stream:
if isinstance(event, TextDelta):
print(event.chunk, end="", flush=True)
asyncio.run(main())
A model is named provider:model. Switch services by changing the name, such as anthropic:MODEL_ID, google:MODEL_ID, or deepseek:MODEL_ID; each reads its key from REPUBLIC_<PROVIDER>_API_KEY. See the provider directory for every supported service.
Documentation
- Quickstart: a first request and a streaming response.
- Providers: services, formats, and credentials.
- Authentication: API keys, CLI logins, and OAuth.
- Guides: tool use, a minimal agent, and structured output.
- Reference: configuration and the provider API, including media input, embeddings, image generation, decision models, history, and custom providers.
- Optional async middleware sees and rewrites the events of every call: retries, stream events and the final response.
Development
uv sync
make check
make test
make build
See Contributing for the development workflow.