@@ -13,58 +13,84 @@ def read_readme():
1313 with open ("README.md" , "r" , encoding = "utf-8" ) as fh :
1414 return fh .read ()
1515
16- # Read version from __init__.py
16+ # Read version from src/brightdata/ __init__.py (src layout)
1717def read_version ():
18- with open (os .path .join ("brightdata" , "__init__.py" ), "r" , encoding = "utf-8" ) as fh :
19- for line in fh :
20- if line .startswith ("__version__" ):
21- return line .split ('"' )[1 ]
22- return "1.0.0"
18+ version_file = os .path .join ("src" , "brightdata" , "__init__.py" )
19+ if os .path .exists (version_file ):
20+ with open (version_file , "r" , encoding = "utf-8" ) as fh :
21+ for line in fh :
22+ if line .startswith ("__version__" ):
23+ return line .split ('"' )[1 ]
24+ # Fallback to _version.py
25+ version_file = os .path .join ("src" , "brightdata" , "_version.py" )
26+ if os .path .exists (version_file ):
27+ with open (version_file , "r" , encoding = "utf-8" ) as fh :
28+ for line in fh :
29+ if line .startswith ("__version__" ):
30+ return line .split ('"' )[1 ]
31+ return "2.0.0"
2332
2433setup (
2534 name = "brightdata-sdk" ,
2635 version = read_version (),
2736 author = "Bright Data" ,
283729- description = "Python SDK for Bright Data Web Scraping and SERP APIs" ,
38+ description = "Modern async-first Python SDK for Bright Data Web Scraping, SERP, and Platform APIs" ,
3039 long_description = read_readme (),
3140 long_description_content_type = "text/markdown" ,
32- url = "https://github.com/brightdata/brightdata-sdk-python" ,
33- packages = find_packages (),
41+ url = "https://github.com/brightdata/sdk-python" ,
42+ package_dir = {"" : "src" },
43+ packages = find_packages (where = "src" ),
3444 classifiers = [
35- "Development Status :: 4 - Beta " ,
45+ "Development Status :: 5 - Production/Stable " ,
3646 "Intended Audience :: Developers" ,
47+ "Intended Audience :: Science/Research" ,
3748 "License :: OSI Approved :: MIT License" ,
3849 "Operating System :: OS Independent" ,
3950 "Programming Language :: Python :: 3" ,
40- "Programming Language :: Python :: 3.7" ,
41- "Programming Language :: Python :: 3.8" ,
4251 "Programming Language :: Python :: 3.9" ,
4352 "Programming Language :: Python :: 3.10" ,
4453 "Programming Language :: Python :: 3.11" ,
4554 "Programming Language :: Python :: 3.12" ,
4655 "Topic :: Internet :: WWW/HTTP" ,
4756 "Topic :: Software Development :: Libraries :: Python Modules" ,
4857 "Topic :: Internet :: WWW/HTTP :: Indexing/Search" ,
58+ "Topic :: Scientific/Engineering :: Information Analysis" ,
59+ "Typing :: Typed" ,
4960 ],
50- python_requires = ">=3.7 " ,
61+ python_requires = ">=3.9 " ,
5162 install_requires = [
63+ "aiohttp>=3.8.0" ,
5264 "requests>=2.25.0" ,
5365 "python-dotenv>=0.19.0" ,
5466 ],
5567 extras_require = {
5668 "dev" : [
57- "pytest>=6.0.0" ,
58- "pytest-cov>=2.10.0" ,
59- "black>=21.0.0" ,
69+ "pytest>=7.0.0" ,
70+ "pytest-cov>=4.0.0" ,
71+ "pytest-asyncio>=0.21.0" ,
72+ "black>=23.0.0" ,
6073 "isort>=5.0.0" ,
61- "flake8>=3.8.0" ,
74+ "flake8>=6.0.0" ,
75+ "mypy>=1.0.0" ,
76+ ],
77+ "notebooks" : [
78+ "jupyter>=1.0.0" ,
79+ "pandas>=1.5.0" ,
80+ "matplotlib>=3.5.0" ,
81+ "tqdm>=4.64.0" ,
82+ ],
83+ },
84+ entry_points = {
85+ "console_scripts" : [
86+ "brightdata=brightdata.cli.main:main" ,
6287 ],
6388 },
64- keywords = "brightdata, web scraping, proxy, serp, api, data extraction" ,
89+ keywords = "brightdata, web scraping, proxy, serp, api, data extraction, async, pandas, jupyter " ,
6590 project_urls = {
66- "Bug Reports" : "https://github.com/brightdata/brightdata-sdk-python/issues" ,
67- "Documentation" : "https://github.com/brightdata/brightdata-sdk-python#readme" ,
68- "Source" : "https://github.com/brightdata/brightdata-sdk-python" ,
91+ "Bug Reports" : "https://github.com/brightdata/sdk-python/issues" ,
92+ "Documentation" : "https://github.com/brightdata/sdk-python#readme" ,
93+ "Source" : "https://github.com/brightdata/sdk-python" ,
94+ "Changelog" : "https://github.com/brightdata/sdk-python/blob/main/CHANGELOG.md" ,
6995 },
70- )
96+ )
0 commit comments