Skip to content

Conversation

@Chocapikk
Copy link
Member

Summary

This PR enhances the LeakIX Python client with modern async support and improved developer experience.

New Features

  • AsyncClient: Full async/await support using httpx for async applications (MCP servers, FastAPI, etc.)
  • Simple search() API: Intuitive method accepting raw query strings like the website
  • Account status: get_api_status() and is_pro() methods using /api/user/info endpoint (cached)
  • Rate limit handling: Automatic retry with exponential backoff on 429 responses
  • Streaming bulk export: Memory-efficient bulk_export_stream() generator

API Examples

# Sync client
from leakix import Client
client = Client(api_key="...")
results = client.search("+plugin:GitConfigHttpPlugin", scope="leak")

# Async client
from leakix import AsyncClient
async with AsyncClient(api_key="...") as client:
    results = await client.search("+country:FR +port:22", scope="service")

Changes

  • Lower Python requirement from 3.13 to 3.10
  • Add leakix/async_client.py with full async implementation
  • Add search(), get_domain(), get_api_status(), is_pro() to both clients
  • Add bulk_export_stream() for memory-efficient streaming
  • Export AsyncClient from package root
  • Version bump to 0.2.0

Recreated from #27 as an internal branch for CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant