Constructor

simplex_client = Simplex(
    api_key: str
)
api_key
string
required

API key for authentication.

Session Creation

def create_session(
  show_in_console: Optional[bool] = True,
  proxies: Optional[bool] = True
) -> str

Creates the remote browser session on the Simplex client.

show_in_console
bool

Whether to print the livestream URL to the console.

proxies
bool

Whether to use proxies to create the session. By default, proxies are used to help with session stability. If you’re having trouble connecting to a website, you can try setting this to False.

return
str

A livestream URL of the current session. The livestream URL can be used for debugging and monitoring the session.

Session Closing

def close_session() -> None

Closes the remote browser session on the Simplex client. We call this automatically when the program exits.

return
None

Sample Usage

from simplex import Simplex
simplex = Simplex(api_key="<api_key>")
livestream_url = simplex.create_session()
print("Click here to view the running session: ", livestream_url)
# Now you can take actions on the browser!
simplex.goto("https://google.com")
simplex.wait(1000)
# ... etc :)

Was this page helpful?