File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ from brightdata import bdclient
3535client = bdclient(api_token = " your_api_token_here" )
3636
3737# Or using environment variables
38- # Set API_TOKEN in your environment or .env file
38+ # Set BRIGHTDATA_API_TOKEN in your environment or .env file
3939client = bdclient()
4040```
4141
@@ -107,7 +107,7 @@ print(f"Found {len(zones)} zones")
107107Create a ` .env ` file in your project root:
108108
109109``` env
110- API_TOKEN =your_bright_data_api_token
110+ BRIGHTDATA_API_TOKEN =your_bright_data_api_token
111111WEB_UNLOCKER_ZONE=your_web_unlocker_zone # Optional
112112BROWSER_ZONE=your_browser_zone # Optional
113113SERP_ZONE=your_serp_zone # Optional
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ def __init__(
4242 #### Create an account at https://brightdata.com/ to get your API token.
4343
4444 Args:
45- api_token: Your Bright Data API token (can also be set via API_TOKEN env var)
45+ api_token: Your Bright Data API token (can also be set via BRIGHTDATA_API_TOKEN env var)
4646 auto_create_zones: Automatically create required zones if they don't exist (default: True)
4747 web_unlocker_zone: Custom zone name for web unlocker (default: from env or 'sdk_unlocker')
4848 browser_zone: Custom zone name for browser API (default: from env or 'sdk_browser')
@@ -52,9 +52,9 @@ def __init__(
5252 load_dotenv ()
5353 except ImportError :
5454 pass
55- self .api_token = api_token or os .getenv ('API_TOKEN ' )
55+ self .api_token = api_token or os .getenv ('BRIGHTDATA_API_TOKEN ' )
5656 if not self .api_token :
57- raise ValueError ("API token is required. Provide it as parameter or set API_TOKEN environment variable" )
57+ raise ValueError ("API token is required. Provide it as parameter or set BRIGHTDATA_API_TOKEN environment variable" )
5858 self .web_unlocker_zone = web_unlocker_zone or os .getenv ('WEB_UNLOCKER_ZONE' , 'sdk_unlocker' )
5959 self .browser_zone = browser_zone or os .getenv ('BROWSER_ZONE' , 'sdk_browser' )
6060 self .serp_zone = os .getenv ('SERP_ZONE' , 'sdk_serp' )
You can’t perform that action at this time.
0 commit comments