brightdata-sdk-patterns

Featured

Apply production-ready Bright Data SDK patterns for TypeScript and Python. Use when implementing Bright Data integrations, refactoring SDK usage, or establishing team coding standards for Bright Data. Trigger with phrases like "brightdata SDK patterns", "brightdata best practices", "brightdata code patterns", "idiomatic brightdata".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Bright Data SDK Patterns ## Overview Production-ready patterns for Bright Data proxy integrations. Since Bright Data uses HTTP proxy protocols (not a dedicated SDK), these patterns wrap proxy configuration, retry logic, session management, and response parsing into reusable modules. ## Prerequisites - Completed `brightdata-install-auth` setup - Familiarity with async/await and HTTP proxy protocols - axios or node-fetch installed ## Instructions ### Step 1: Proxy Client Singleton ```typescript // src/brightdata/client.ts import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'; import https from 'https'; import 'dotenv/config'; let instance: AxiosInstance | null = null; export function getBrightDataClient(options?: { country?: string; session?: string; zone?: string; }): AxiosInstance { const { BRIGHTDATA_CUSTOMER_ID, BRIGHTDATA_ZONE, BRIGHTDATA_ZONE_PASSWORD } = process.env; const zone = options?.zone || BRIGHTDATA_ZONE!; let username = `brd-customer-${BRIGHTDATA_CUSTOMER_ID}-zone-${zone}`; if (options?.country) username += `-country-${options.country}`; if (options?.session) username += `-session-${options.session}`; if (!instance || options) { instance = axios.create({ proxy: { host: 'brd.superproxy.io', port: 33335, auth: { username, password: BRIGHTDATA_ZONE_PASSWORD! }, }, httpsAgent: new https.Agent({ rejectUnauthorized: false }), timeout: 60000, headers: { 'User-Agent': 'Mo...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category