11[build-system ]
2- requires = [" setuptools>=61.0" , " wheel" ]
2+ requires = [ " setuptools>=61.0" , " wheel" , ]
33build-backend = " setuptools.build_meta"
44
55[project ]
66name = " stagehand"
7- version = " 0.0.6 "
7+ version = " 0.1.0 "
88description = " Python SDK for Stagehand"
99readme = " README.md"
10- license = {text = " MIT" }
11- authors = [
12- {
name =
" Browserbase, Inc." ,
email =
" [email protected] " }
13- ]
14- classifiers = [
15- " Programming Language :: Python :: 3" ,
16- " License :: OSI Approved :: MIT License" ,
17- " Operating System :: OS Independent" ,
18- ]
10+ classifiers = [ " Programming Language :: Python :: 3" , " License :: OSI Approved :: MIT License" , " Operating System :: OS Independent" ,]
1911requires-python = " >=3.9"
20- dependencies = [
21- " httpx>=0.24.0" ,
22- " python-dotenv>=1.0.0" ,
23- " pydantic>=1.10.0" ,
24- " playwright>=1.42.1" ,
25- " requests>=2.31.0" ,
26- " browserbase>=1.4.0" ,
27- " rich>=14.0.0" ,
28- " openai>=1.83.0" ,
29- " anthropic>=0.51.0" ,
30- " litellm>=1.72.0" ,
31- ]
12+ dependencies = [ " httpx>=0.24.0" , " python-dotenv>=1.0.0" , " pydantic>=1.10.0" , " playwright>=1.42.1" , " requests>=2.31.0" , " browserbase>=1.4.0" , " rich>=14.0.0" , " openai>=1.83.0" , " anthropic>=0.51.0" , " litellm>=1.72.0" ,]
13+ [[project .authors ]]
14+ name = " Browserbase, Inc."
15+ 16+
17+ [project .license ]
18+ text = " MIT"
3219
3320[project .optional-dependencies ]
34- dev = [
35- " pytest>=7.3.1" ,
36- " pytest-asyncio>=0.21.0" ,
37- " pytest-mock>=3.10.0" ,
38- " pytest-cov>=4.1.0" ,
39- " black>=23.3.0" ,
40- " isort>=5.12.0" ,
41- " mypy>=1.3.0" ,
42- " ruff" ,
43- " psutil>=5.9.0" ,
44- ]
21+ dev = [ " pytest>=7.3.1" , " pytest-asyncio>=0.21.0" , " pytest-mock>=3.10.0" , " pytest-cov>=4.1.0" , " black>=23.3.0" , " isort>=5.12.0" , " mypy>=1.3.0" , " ruff" , " psutil>=5.9.0" ,]
4522
4623[project .urls ]
4724Homepage = " https://github.com/browserbase/stagehand-python"
4825Repository = " https://github.com/browserbase/stagehand-python"
4926
50- [tool .setuptools ]
51- # Omit explicit package list so we can use the nested `.packages.find` table below.
52-
53- [tool .setuptools .packages .find ]
54- where = [" ." ]
55- include = [" stagehand*" ]
56-
57- [tool .setuptools .package-data ]
58- stagehand = [" domScripts.js" ]
59-
6027[tool .ruff ]
61- # Same as Black
6228line-length = 88
29+ target-version = " py39"
30+ exclude = [ " .git" , " .ruff_cache" , " __pycache__" , " venv" , " .venv" , " dist" , " tests" ,]
6331
64- # Target Python version
65- target-version = " py39" # Adjust to your version
32+ [tool .black ]
33+ line-length = 88
34+ target-version = [ " py39" ,]
35+ include = " \\ .pyi?$"
36+ exclude = " /(\n \\ .git\n | \\ .hg\n | \\ .mypy_cache\n | \\ .tox\n | \\ .venv\n | _build\n | buck-out\n | build\n | dist\n | __pycache__\n | python-sdk\n )/\n "
37+ skip-string-normalization = false
38+ preview = true
6639
67- # Exclude a variety of commonly ignored directories
68- exclude = [
69- " .git" ,
70- " .ruff_cache" ,
71- " __pycache__" ,
72- " venv" ,
73- " .venv" ,
74- " dist" ,
75- " tests"
76- ]
40+ [tool .isort ]
41+ profile = " black"
42+ line_length = 88
43+ multi_line_output = 3
44+ include_trailing_comma = true
45+ force_grid_wrap = 0
46+ use_parentheses = true
47+ ensure_newline_before_comments = true
48+ skip_gitignore = true
49+ skip_glob = [ " **/venv/**" , " **/.venv/**" , " **/__pycache__/**" ,]
50+
51+ [tool .setuptools .package-data ]
52+ stagehand = [ " domScripts.js" ,]
7753
78- # Define lint-specific settings here
7954[tool .ruff .lint ]
80- select = [" E" , " F" , " B" , " C4" , " UP" , " N" , " I" , " C" ]
81- # Ignore line length errors - let Black handle those
82- ignore = [" E501" , " C901" ]
83- # Allow autofix for all enabled rules (when `--fix` is provided)
84- fixable = [" ALL" ]
55+ select = [ " E" , " F" , " B" , " C4" , " UP" , " N" , " I" , " C" ,]
56+ ignore = [ " E501" , " C901" ,]
57+ fixable = [ " ALL" ,]
8558unfixable = []
86- # Allow unused variables when underscore-prefixed
8759dummy-variable-rgx = " ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
8860
8961[tool .ruff .format ]
9062quote-style = " double"
9163indent-style = " space"
9264line-ending = " auto"
9365
94- # Naming conventions are part of the N rules
66+ [tool .pytest .ini_options ]
67+ testpaths = [ " tests" ,]
68+ python_files = [ " test_*.py" ,]
69+ python_classes = [ " Test*" ,]
70+ python_functions = [ " test_*" ,]
71+ asyncio_mode = " auto"
72+ addopts = [ " --cov=stagehand" , " --cov-report=html:htmlcov" , " --cov-report=term-missing" , " --cov-report=xml" , " --strict-markers" , " --strict-config" , " -ra" , " --tb=short" ,]
73+ markers = [ " unit: Unit tests for individual components" , " integration: Integration tests requiring multiple components" , " e2e: End-to-end tests with full workflows" , " slow: Tests that take longer to run" , " browserbase: Tests requiring Browserbase connection" , " local: Tests for local browser functionality" , " llm: Tests involving LLM interactions" , " mock: Tests using mock objects only" , " performance: Performance and load tests" , " smoke: Quick smoke tests for basic functionality" ,]
74+ filterwarnings = [ " ignore::DeprecationWarning" , " ignore::PendingDeprecationWarning" , " ignore::UserWarning:pytest_asyncio" , " ignore::RuntimeWarning" ,]
75+ minversion = " 7.0"
76+
77+ [tool .setuptools .packages .find ]
78+ where = [ " ." ,]
79+ include = [ " stagehand*" ,]
80+
9581[tool .ruff .lint .pep8-naming ]
96- # Allow underscores in class names (e.g. Test_Case)
97- classmethod-decorators = [" classmethod" , " validator" ]
82+ classmethod-decorators = [ " classmethod" , " validator" ,]
9883
99- # Per-file ignores
10084[tool .ruff .lint .per-file-ignores ]
101- # Ignore imported but unused in __init__.py files
102- "__init__.py" = [" F401" ]
103- # Ignore unused imports in tests
104- "tests/*" = [" F401" , " F811" ]
85+ "__init__.py" = [ " F401" ,]
86+ "tests/*" = [ " F401" , " F811" ,]
10587
106- # Add more customizations if needed
10788[tool .ruff .lint .pydocstyle ]
10889convention = " google"
109-
110- # Pytest configuration
111- [tool .pytest .ini_options ]
112- testpaths = [" tests" ]
113- python_files = [" test_*.py" ]
114- python_classes = [" Test*" ]
115- python_functions = [" test_*" ]
116- asyncio_mode = " auto"
117- addopts = [
118- " --cov=stagehand" ,
119- " --cov-report=html:htmlcov" ,
120- " --cov-report=term-missing" ,
121- " --cov-report=xml" ,
122- # "--cov-fail-under=75", # Commented out for future addition
123- " --strict-markers" ,
124- " --strict-config" ,
125- " -ra" ,
126- " --tb=short"
127- ]
128- markers = [
129- " unit: Unit tests for individual components" ,
130- " integration: Integration tests requiring multiple components" ,
131- " e2e: End-to-end tests with full workflows" ,
132- " slow: Tests that take longer to run" ,
133- " browserbase: Tests requiring Browserbase connection" ,
134- " local: Tests for local browser functionality" ,
135- " llm: Tests involving LLM interactions" ,
136- " mock: Tests using mock objects only" ,
137- " performance: Performance and load tests" ,
138- " smoke: Quick smoke tests for basic functionality"
139- ]
140- filterwarnings = [
141- " ignore::DeprecationWarning" ,
142- " ignore::PendingDeprecationWarning" ,
143- " ignore::UserWarning:pytest_asyncio" ,
144- " ignore::RuntimeWarning"
145- ]
146- minversion = " 7.0"
147-
148- # Black configuration
149- [tool .black ]
150- line-length = 88
151- target-version = [" py39" ]
152- include = ' \.pyi?$'
153- exclude = '''
154- /(
155- \.git
156- | \.hg
157- | \.mypy_cache
158- | \.tox
159- | \.venv
160- | _build
161- | buck-out
162- | build
163- | dist
164- | __pycache__
165- | python-sdk
166- )/
167- '''
168- # Ensure Black will wrap long strings and docstrings
169- skip-string-normalization = false
170- preview = true
171-
172- # isort configuration to work with Black
173- [tool .isort ]
174- profile = " black"
175- line_length = 88
176- multi_line_output = 3
177- include_trailing_comma = true
178- force_grid_wrap = 0
179- use_parentheses = true
180- ensure_newline_before_comments = true
181- skip_gitignore = true
182- skip_glob = [" **/venv/**" , " **/.venv/**" , " **/__pycache__/**" ]
0 commit comments