### Install Fiber AI Python SDK Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Install the Fiber AI Python SDK using pip. This is the first step to using the SDK. ```bash pip install fiberai ``` -------------------------------- ### Quick Start: Synchronous Company Search Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Perform a synchronous company search using the Fiber AI Python SDK. Requires creating a client and defining search parameters. ```python from fiberai import Client from fiberai.api.search import company_search from fiberai.models import CompanySearchBody # Create a client client = Client(base_url="https://api.fiber.ai") # Search for companies body = CompanySearchBody.from_dict({ "apiKey": "YOUR_API_KEY", "searchParams": { "standardIndustries": ["Software"], "employeeCount": {"gte": 50, "lte": 500} }, "pageSize": 10, }) response = company_search.sync(client=client, body=body) ``` -------------------------------- ### Configure Custom Headers Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Add custom headers to API requests. This is useful for authentication or passing specific metadata. ```python client = Client( base_url="https://api.fiber.ai", headers={"X-Custom-Header": "value"}, ) ``` -------------------------------- ### Asynchronous Company Search Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Perform an asynchronous company search using the Fiber AI Python SDK. This is useful for non-blocking I/O operations. ```python import asyncio from fiberai import Client from fiberai.api.search import company_search from fiberai.models import CompanySearchBody async def main(): client = Client(base_url="https://api.fiber.ai") body = CompanySearchBody.from_dict({ "apiKey": "YOUR_API_KEY", "searchParams": { "standardIndustries": ["Software"], }, "pageSize": 10, }) response = await company_search.asyncio(client=client, body=body) print(response) asyncio.run(main()) ``` -------------------------------- ### Configure Custom Timeout Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Set a custom timeout for API requests using httpx.Timeout. This helps manage request durations. ```python import httpx from fiberai import Client client = Client( base_url="https://api.fiber.ai", timeout=httpx.Timeout(30.0), # 30 second timeout ) ``` -------------------------------- ### Asynchronous Detailed Response Handling Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Access detailed asynchronous API responses, including status codes, headers, and the raw parsed body. ```python # Async response = await company_search.asyncio_detailed(client=client, body=body) ``` -------------------------------- ### Synchronous Detailed Response Handling Source: https://github.com/fiber-ai/python-sdk/blob/main/README.md Access detailed synchronous API responses, including status codes, headers, and the raw parsed body. ```python from fiberai.api.search import company_search # Sync response = company_search.sync_detailed(client=client, body=body) print(response.status_code) print(response.headers) print(response.parsed) # The parsed response body ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.