Skip to main content

Python package to simulate human keyboard typing

Project description

human_typer

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

MIT

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

human_typer-1.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

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

Hashes for human_typer-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0c823c4e05cc49245b9e54422b6674e024da915a6e4389bcca7b7b12550b9c32
MD5 69fc2a53b9a16d74e0d8d2fb4bbb33e5
BLAKE2b-256 4da39a56539a539995523710dcbf0e19441c9b650617dc5aed1ff69f7d777d24

See more details on using hashes here.

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

Hashes for human_typer-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f41602b5fe0d693d680a4d78deb8048b9b5b7db1d07e0290eb06f593b64af7a
MD5 f8f4006760beda949d01449210c1e443
BLAKE2b-256 497f8afae88588b0febf880eafe51f1a795e09a5ec3ca247e75b1d8da3cc3cb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page