jupyterlite-pyodide-lock-webdriver#

A WebDriver locker strategy for jupyterlite-pyodide-lock.

Lockers#

WebDriverLocker#

Locker implementation jupyterlite-pyodide-lock-webdriver.

class jupyterlite_pyodide_lock_webdriver.locker.WebDriverLocker(**kwargs) None[source]#

Bases: TornadoLocker

A locker that uses the WebDriver standard to control a browser.

Parameters:

kwargs (Any)

Create a configurable given a config config.

Parameters#

configConfig

If this is empty, default values are used. If config is a Config instance, it will be used to configure the instance.

parentConfigurable instance, optional

The parent Configurable instance of this object.

Notes#

Subclasses of Configurable must call the __init__() method of Configurable before doing anything else and using super():

class MyConfigurable(Configurable):
    def __init__(self, config=None):
        super(MyConfigurable, self).__init__(config=config)
        # Then any other code you need to finish initialization.

This ensures that instances will be configured properly.

param kwargs:

type kwargs:

Any

browser c.WebDriverLocker.browser = Unicode('')#

an alias for a pre-configured browser

browser_path c.WebDriverLocker.browser_path = Unicode('')#

an absolute path to a browser, if not well-known or on $PATH

cleanup() None[source]#

Clean up the WebDriver.

Return type:

None

extra_micropip_args c.WebDriverLocker.extra_micropip_args = Dict()#

options for micropip.install

async fetch() None[source]#

Create the WebDriver, open the lock page, and wait for it to lock.

Return type:

None

headless c.WebDriverLocker.headless = Bool(True)#

run the browser in headless mode

host c.WebDriverLocker.host = Unicode('127.0.0.1')#

the host on which to bind

port c.WebDriverLocker.port = Int(0)#

the port on which to listen

protocol c.WebDriverLocker.protocol = Unicode('http')#

the protocol to serve

pyodide_cdn_url c.WebDriverLocker.pyodide_cdn_url = Unicode('https://cdn.jsdelivr.net/pyodide/v0.27.6/full')#

remote URL for the version of a full pyodide distribution; defaults to the version provided by jupyterlite_pyodide_kernel

pypi_api_url c.WebDriverLocker.pypi_api_url = Unicode('https://pypi.org/pypi')#

remote URL for a Warehouse-compatible JSON API

timeout c.WebDriverLocker.timeout = Int(0)#

seconds to wait for a solve

tornado_settings c.WebDriverLocker.tornado_settings = Dict()#

override settings used by the tornado server

webdriver_env c.WebDriverLocker.webdriver_env = Dict()#

custom environment variable overrides

webdriver_log_output c.WebDriverLocker.webdriver_log_output = Unicode('')#

a path to the webdriver log

webdriver_option_arguments c.WebDriverLocker.webdriver_option_arguments = TypedTuple()#

options to add to the webdriver browser

webdriver_path c.WebDriverLocker.webdriver_path = Unicode('')#

an absolute path to a driver, if not well-known or on $PATH

webdriver_service_args c.WebDriverLocker.webdriver_service_args = List()#

arguments for the webdriver binary

Miscellaneous#

Browser Info#

Browser details for jupyterlite-pyodide-lock-webdriver.

class jupyterlite_pyodide_lock_webdriver.browsers.Browser[source]#

Bases: TypedDict

Common values for selenium configuration.

browser_binary: str#
log_output: str#
options_class: type[ArgOptions]#
service_args: list[str]#
service_class: type[Service]#
webdriver_class: type[WebDriver]#
webdriver_path: str#