Quick Start — pyUSPTO 0.2.3.dev1+g2c5d89b38.d20251125 documentation

# Quick Start

This guide will help you get started with the pyUSPTO library.

## Configuration

    from pyUSPTO import BulkDataClient, PatentDataClient
    from pyUSPTO.config import USPTOConfig
    import os

    # Method 1: Direct API key initialization
    client1 = BulkDataClient(api_key="your_api_key_here")

    # Method 2: Using USPTOConfig
    config = USPTOConfig(api_key="your_api_key_here")
    client2 = BulkDataClient(config=config)

    # Method 3: Using environment variables
    os.environ["USPTO_API_KEY"] = "your_api_key_here"
    config_from_env = USPTOConfig.from_env()
    client3 = BulkDataClient(config=config_from_env)

## Examples

Searching for patents:

    from pyUSPTO import PatentDataClient

    client = PatentDataClient(api_key="your_api_key_here")

    # Search for patents by inventor name
    inventor_search = client.search_patents(inventor_name="Smith")
    print(f"Found {inventor_search.count} patents with 'Smith' as inventor")