Releases: iqbalmh18/brave-api
Releases · iqbalmh18/brave-api
Release list
v0.1.1 - Add proxy pool support with automatic fallback
✨ What's New
This release introduces proxy pool support with automatic direct-connection fallback and improves transport reliability.
Added
- Proxy pool support with automatic proxy rotation.
- Fallback to direct connections when all proxies are unavailable.
- Proxy Support link in the table of contents.
ClientConfig(proxy_list=[...])examples in the client configuration section.- New
Proxy Supportdocumentation section. - Example proxy entries in the Examples table.
- Reference to
examples/proxy-usage.py.
Proxy Support
The new proxy system includes:
- Support for the following proxy schemes:
httphttpssocks4socks4asocks5socks5h
- Round-robin proxy selection on every request.
- Failed proxies are temporarily disabled for the lifetime of the client instance.
- Automatic fallback to
proxies=Nonewhen all proxies fail. - HTTP
429and5xxresponses do not permanently disable proxies. - Transport logging that never exposes proxy credentials.
Example
client = ClientConfig(
proxy_list=[
"http://user:password@proxy-1.example.com:8080",
"http://user:password@proxy-2.example.com:8080",
]
)v0.1.0 - Initial release
Initial release
This release introduces the first public version of brave-api-python.
An async Python client for Brave Search, providing streaming AI answers and structured web search through a single, typed interface — with built-in Model Context Protocol (MCP) server support.
Features
- Ask (AI)
- Search (Web)
- MCP Server
Installation
uv add brave-api-pythonWith MCP server support:
uv pip install "brave-api-python[mcp]"Quick start
import asyncio
from brave_api import BraveClient
async def main():
async with BraveClient() as client:
# AI answer
result = await client.ask("what is quantum computing?")
print(result.text)
# Web search
search = await client.search("python asyncio tutorial")
for item in search.web:
print(item.title, item.url)
asyncio.run(main())MCP
uv run python -m brave_api.mcp.server
# or via the CLI entry-point
source .venv/bin/activate
brave-api-mcp