Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e698642
Initial commit
vzucher Nov 10, 2025
a805262
First Commit
vzucher Nov 10, 2025
b6d300a
Migrating everything to Public repo
vzucher Nov 10, 2025
bf31d2b
Migrating everything to public repo
vzucher Nov 10, 2025
a3a6f5d
Merge branch 'main'
vzucher Nov 10, 2025
b282f0e
Readme to root
vzucher Nov 10, 2025
2783f66
docs: add comprehensive SDK refactoring plan and structure documentation
leonardo-martins-dev Nov 10, 2025
809886a
Merge pull request #1 from vzucher/initial-setup
vzucher Nov 10, 2025
60299d6
chore: ensure complete codebase sync
leonardo-martins-dev Nov 11, 2025
d300b13
feat: implement unified result object hierarchy and initial structure
leonardo-martins-dev Nov 11, 2025
8aa9eef
feat(web-unlocker): implement WebUnlockerService with unified result …
leonardo-martins-dev Nov 11, 2025
75dc6e0
Merge pull request #3 from vzucher/WebUnlockerService
leonardo-martins-dev Nov 11, 2025
c729efb
feat: implement BrightDataClient with hierarchical service access and…
vzucher Nov 12, 2025
03d436a
Merge pull request #5 from vzucher/bright-client
vzucher Nov 12, 2025
e7fbe9b
feat: implement WebScraperService abstraction with platform scrapers
vzucher Nov 12, 2025
cf84906
feat: implement SERP service abstraction for multi-engine search
vzucher Nov 12, 2025
4194073
feat: implement complete BrightData SDK with LinkedIn, Amazon, ChatGP…
vzucher Nov 12, 2025
19d63ef
feat: restructure repo - promote new-sdk to root, archive old impleme…
vzucher Nov 12, 2025
63a7a1b
chore: move GitHub workflows and pre-commit config to root
vzucher Nov 12, 2025
7c3d645
chore: organize old SDKs into archive/ directory
vzucher Nov 12, 2025
25ed792
Everything to Root
vzucher Nov 12, 2025
55779a7
docs: create production-ready README and move planning doc to PLAN.md
vzucher Nov 12, 2025
2c35d9c
feat: comprehensive interactive demo covering all 8 task specs
vzucher Nov 12, 2025
cdc589c
fix: correct ChatGPT search method call in demo
vzucher Nov 12, 2025
fbf0742
fix: add required url field to ChatGPT search payload
vzucher Nov 12, 2025
26a97e4
fix: handle HTTP 202 response in ChatGPT sync mode (requires polling)
vzucher Nov 12, 2025
7ff1310
refactor: change confirmation prompts from yes/no to y/n for better UX
vzucher Nov 12, 2025
e0cc90c
test: add automated demo test covering all 12 menu options (13/13 pas…
vzucher Nov 12, 2025
654cd6e
refactor: apply 4 critical code quality improvements
leonardo-martins-dev Nov 14, 2025
8657e64
refactor: major architectural improvements and code organization
leonardo-martins-dev Nov 19, 2025
0bceacb
chore: remove emojis and comments
leonardo-martins-dev Nov 19, 2025
5560278
refactor: SERP Related Issues
leonardo-martins-dev Nov 19, 2025
6e51cf9
feat: Facebook scrape and search
leonardo-martins-dev Nov 19, 2025
e708abc
feat: Instagram scrape and search
leonardo-martins-dev Nov 19, 2025
dfed011
feat: add sdk_function parameter for function-level monitoring
leonardo-martins-dev Nov 19, 2025
34b2575
refactor: centralize magic numbers into constants module
leonardo-martins-dev Nov 20, 2025
2e12531
Merge pull request #6 from vzucher/finalReview
vzucher Nov 20, 2025
8bec9f3
README update
vzucher Nov 20, 2025
db58809
Added new tests and imported correctly the new modules in init file
vzucher Nov 20, 2025
7c6a549
Added Zone Creation Endpoint and Tests
vzucher Nov 20, 2025
8a206c4
Fixed SERP pass this param to url &brd_json=1
vzucher Nov 20, 2025
9f36969
Major Fixes in how we retrieve data from API through sdk's providers
vzucher Nov 20, 2025
a1720ba
refactor: improve code quality with constants and best practices
leonardo-martins-dev Nov 20, 2025
2e655a7
test: update tests for new default zone names and dataset IDs
leonardo-martins-dev Nov 20, 2025
8f0d1ed
feat: Add CLI
leonardo-martins-dev Nov 21, 2025
f1e2250
style: ANSI art
leonardo-martins-dev Nov 21, 2025
9f66214
Merge pull request #7 from vzucher/Code-Improvements
vzucher Nov 21, 2025
ec83b52
Merge pull request #8 from vzucher/cli-feature
vzucher Nov 21, 2025
df399d7
Autozones creation async with self.engine: which creates a nested co…
vzucher Nov 21, 2025
dac165f
Added zone deletion endpoint to zone manager
vzucher Nov 21, 2025
ba85aae
Fixing Zones
vzucher Nov 21, 2025
657edc0
Added Permissions verbose & testing
vzucher Nov 21, 2025
ff615dc
Fix AsyncEngine duplication
vzucher Nov 24, 2025
b759e05
Quick Audit
vzucher Nov 24, 2025
dc2ee64
Migrated from typedict to dataclass
vzucher Nov 26, 2025
23436a6
Added Notebooks for DS and updated README
vzucher Nov 26, 2025
b595e59
feat/ added new trigger interface
vzucher Nov 27, 2025
9a00a52
fixed nested async with
vzucher Nov 27, 2025
cfaba9b
done
vzucher Nov 28, 2025
b048c2e
Fixed sync calls
vzucher Nov 30, 2025
129fef4
Linkedin search improvements
vzucher Dec 1, 2025
82e418c
Zone Manager and CLI fix
vzucher Dec 1, 2025
37ed17f
amazon search
vzucher Dec 1, 2025
bb06cba
udpated setup file
vzucher Dec 1, 2025
0b6cc2d
BrightData Python SDK v2 2.0
vzucher Dec 1, 2025
7e77189
style: apply black formatting to all files
vzucher Dec 1, 2025
101262f
Merge branch 'master' into sdk-python-v2
vzucher Dec 1, 2025
afdccb1
fix: resolve all ruff linting errors and add Python 3.9 compatibility
vzucher Dec 1, 2025
aac4394
ci: make mypy non-blocking to allow gradual type adoption
vzucher Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff mypy
pip install types-requests aiohttp python-dotenv tldextract aiolimiter pydantic

- name: Run black
run: black --check src tests

- name: Run ruff
run: ruff check src tests

- name: Run mypy (non-blocking)
run: mypy src --ignore-missing-imports || echo "⚠️ mypy found type issues (non-blocking)"
continue-on-error: true
47 changes: 6 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,30 @@
name: Build and Publish
name: Publish to PyPI

on:
push:
tags:
- 'v*'
release:
types: [published]
workflow_dispatch:

jobs:
build:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.9"

- name: Install dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install -r requirements.txt

- name: Build package
run: python -m build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-files
path: dist/

- name: Publish to PyPI
if: github.event_name == 'release'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
run: twine upload dist/*

test-install:
runs-on: ubuntu-latest
needs: build

steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist-files
path: dist/

- name: Test wheel installation
run: |
pip install dist/*.whl
python -c "import brightdata; print('✅ Package imported successfully')"
155 changes: 38 additions & 117 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,129 +1,50 @@
name: Tests
name: Test

on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main ]
schedule:
- cron: '0 2 * * *'
branches: [main, develop]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov

- name: Test package import
run: |
python -c "import brightdata; print('Import successful')"

- name: Run tests
run: |
python -m pytest tests/ -v --cov=brightdata --cov-report=xml

- name: Upload coverage to Codecov
if: matrix.python-version == '3.8'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
python-version: ["3.9", "3.10", "3.11", "3.12"]

test-pypi-package:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
strategy:
matrix:
python-version: ['3.8', '3.11']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install PyPI package
run: |
python -m pip install --upgrade pip
pip install brightdata-sdk
pip install pytest

- name: Test PyPI package import
run: |
python -c "import brightdata; print('PyPI package import successful')"
python -c "from brightdata import bdclient; print('bdclient import successful')"

- name: Test PyPI package basic functionality
run: |
python -c "
import sys
from brightdata import bdclient, __version__
print(f'PyPI package version: {__version__}')

# Test that validation works (accept any validation error as success)
try:
client = bdclient(api_token='test_token_too_short')
print('WARNING: No validation error - this might indicate an issue')
except Exception as e:
print(f'Validation error caught: {str(e)[:100]}...')
print('PyPI package validation working correctly')

# Test basic client creation with disabled auto-zone creation
try:
client = bdclient(api_token='test_token_123456789', auto_create_zones=False)
print('Client creation successful')

# Test that basic methods exist
methods = ['scrape', 'search', 'download_content']
for method in methods:
if hasattr(client, method):
print(f'Method {method} exists')
else:
print(f'Method {method} missing (might be version difference)')

except Exception as e:
print(f'ERROR: Client creation failed: {e}')
sys.exit(1)

print('PyPI package basic functionality test completed')
"

- name: Test PyPI package compatibility
run: |
python -c "
print('Running PyPI package compatibility tests...')

# Test import compatibility
try:
from brightdata import bdclient, __version__
from brightdata.exceptions import ValidationError
print('Core imports working')
except ImportError as e:
print(f'ERROR: Import failed: {e}')
exit(1)

# Test that client requires token
try:
client = bdclient() # Should fail without token
print('WARNING: Client created without token - unexpected')
except Exception:
print('Token requirement validated')

print('PyPI package compatibility tests completed')
"
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Lint with Ruff
run: |
ruff check src/ tests/

- name: Format check with Black
run: |
black --check src/ tests/

- name: Type check with mypy (non-blocking)
run: |
mypy src/ --ignore-missing-imports || echo "⚠️ mypy found type issues (non-blocking)"
continue-on-error: true

- name: Test with pytest
run: |
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
Loading