Python package to simulate human keyboard typing
Project description
Human Typer
Python package to simulate human keyboard typing
Installation
Use the package manager pip to install human_typer.
pip install human_typer
For Playwright support:
pip install human_typer[playwright]
Usage
from human_typer import Human_typer
My_Typer = Human_typer(keyboard_layout = "qwerty", average_cpm = 190)
# Directly with keyboard
My_Typer.keyboard_type("my text")
# With a Selenium element
my_element = driver.find_element_by_id("ID")
My_Typer.type_in_element("my text", my_element)
# With optional custom typo error rate (default is 0.02 = 2% of every character typed)
My_Typer = Human_typer(keyboard_layout = "qwerty", average_cpm = 190, error_rate = 0.05)
# With a Playwright element (requires: pip install human_typer[playwright])
from playwright.sync_api import sync_playwright
My_Typer = Human_typer(element_type="playwright")
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("https://example.com")
element = page.locator("#my-input")
My_Typer.type_in_element("my text", element)
browser.close()
Contributing
Pull requests are welcome 😊
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
human_typer-1.1.1.tar.gz
(9.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file human_typer-1.1.1.tar.gz.
File metadata
- Download URL: human_typer-1.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c823c4e05cc49245b9e54422b6674e024da915a6e4389bcca7b7b12550b9c32
|
|
| MD5 |
69fc2a53b9a16d74e0d8d2fb4bbb33e5
|
|
| BLAKE2b-256 |
4da39a56539a539995523710dcbf0e19441c9b650617dc5aed1ff69f7d777d24
|
File details
Details for the file human_typer-1.1.1-py3-none-any.whl.
File metadata
- Download URL: human_typer-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f41602b5fe0d693d680a4d78deb8048b9b5b7db1d07e0290eb06f593b64af7a
|
|
| MD5 |
f8f4006760beda949d01449210c1e443
|
|
| BLAKE2b-256 |
497f8afae88588b0febf880eafe51f1a795e09a5ec3ca247e75b1d8da3cc3cb4
|