ChromePy
ChromePy makes it possible to create just one Google Chrome instance and multiple ChromeRemote remote controllers. It avoids opening multiple Chrome instances as it can be very resource consuming.
The workflow is as simple as:
Chromecreates a Selenium Chrome Driver instance and saves session data on a text file.ChromeRemoteuses this session data to create a Selenium Remote instance and control the same browser driver.
Install
Just install from pip
pip install ChromePy
Usage
To start a Chrome instance
from chromepy.chrome import Chrome
chrome = Chrome.instance
chrome.get('https://google.com')
print('Chrome running at ', chrome.current_url)
print(chrome.command_executor._url, chrome.session_id)
input('Press any key to quit chrome...')
chrome.quit()
To start Remote instances. Remember not to call remote.quit() as it will kill the chrome instance as well.
from chromepy.remote import ChromeRemote
remote1 = ChromeRemote()
print('remote1 url', remote1.current_url)
remote1.get('https://google.com')
remote2 = ChromeRemote()
print('remote2 url', remote2.current_url)
This examples can be found in the examples directory.
Changelog
- 0.0.5 - Basic Chrome and ChromeRemote
Metadata
Release files for ChromePy 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ChromePy-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ChromePy-0.0.5-py3-none-any.whl |
Release files / ChromePy-0.0.5-py3-none-any.whl
| Download URL | ChromePy-0.0.5-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf90bd7aecf43df071dae836b3838c5e9de6e63ba0cc1587067e0d4a27123ad8
|
|
BLAKE2b-256 checksum How to use checksums |
f2dfea7c4358e729c07e0847fcd0ff4938ab82c3c280f4a3445f1534684a9d70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.3
|
Security for ChromePy 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.