playwright-python icon indicating copy to clipboard operation
playwright-python copied to clipboard

[Feature]: support installing browsers as extras

Open DetachHead opened this issue 1 year ago • 4 comments

🚀 Feature Request

python packages can define extras, which are additional optional parts of the package. more info here

it would be nice if playwright defined each browser as an optional extra, so that they can be installed like so:

pip install playwright[chromium,firefox]

Example

No response

Motivation

this prevents the user from having to manually run playwright install after installing all of their dependencies. in my project, we have an "install dependencies" script which basically just runs both poetry install and playwright install. it would be nice if we could just specify the browsers as extras in pyproject.toml so we don't need the additional script.

DetachHead avatar Jul 30 '24 07:07 DetachHead

Great! So, if a browser isn't specified, do you propose that nothing changes? For example, if the user installs Playwright as pip install playwright, then they will still have to use the playwright install script.

danphenderson avatar Sep 11 '24 19:09 danphenderson

yeah

DetachHead avatar Sep 11 '24 20:09 DetachHead

Great idea 🚀! Also, an API to install the browsers withing the code itself would be really useful. Something like webdriver-manager.

hasansezertasan avatar Aug 10 '25 01:08 hasansezertasan

This is a much needed feature.

zulqasar avatar Nov 04 '25 00:11 zulqasar