Skip to content

Releases: iqbalmh18/brave-api

v0.1.1 - Add proxy pool support with automatic fallback

Choose a tag to compare

@iqbalmh18 iqbalmh18 released this 15 Jul 14:24

✨ 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 Support documentation 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:
    • http
    • https
    • socks4
    • socks4a
    • socks5
    • socks5h
  • Round-robin proxy selection on every request.
  • Failed proxies are temporarily disabled for the lifetime of the client instance.
  • Automatic fallback to proxies=None when all proxies fail.
  • HTTP 429 and 5xx responses 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

Choose a tag to compare

@iqbalmh18 iqbalmh18 released this 09 Jul 18:42
7a0727c

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-python

With 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