Skip to main content

This public library simulates user activity to prevent session inactivity, ensuring that processes requiring continuous active user sessions remain operational.

Project description

# anti-afk

anti-afk is a Python library that simulates user activity to prevent your system from being marked as AFK (Away From Keyboard). It works by periodically moving the mouse and optionally simulating a key press (default: Shift). This is especially useful for keeping your status active in applications like Microsoft Teams, Zoom, or any other environment that detects inactivity.

## Features

  • Simulated Mouse Movement: Randomly moves the mouse within a specified pixel range.

  • Optional Key Press Simulation: Simulates a Shift key press to generate extra activity.

  • Customizable Duration & Interval: Specify how long and how frequently the simulation should run.

  • Interruptible Execution: The simulation stops immediately if the ESC key is pressed.

## Installation

You can install anti-afk from PyPI using pip:

`bash pip install anti-afk `

## Example

Below is the simple example to call the module for 10 minutes (run_duration: Run for 10 minutes).

`bash from anti_afk import AntiAFK AntiAFK(run_duration=10).run() `

## Dependencies

This project depends on the following Python packages:

You can install these dependencies using pip. If you have a virtual environment set up, activate it first, then run: `bash pip install -r requirements.txt `

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

anti_afk_lib-0.1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

anti_afk_lib-0.1.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file anti_afk_lib-0.1.4.tar.gz.

File metadata

  • Download URL: anti_afk_lib-0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for anti_afk_lib-0.1.4.tar.gz
Algorithm Hash digest
SHA256 dcea3d799cc82721d90a551db3c5fa2086e14538fc4870ef6839a5b2aaba47dc
MD5 bf763700500a38d01ae7ba2fe75ab358
BLAKE2b-256 371554adeacad0ee48c221339dbfe5bb21a711e1bec4e38817cad0aa35607e0a

See more details on using hashes here.

File details

Details for the file anti_afk_lib-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: anti_afk_lib-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for anti_afk_lib-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9af0bbd47df7bdda00a4436cec110a97e3c1b7c1c3b64be1e77706388e3565ea
MD5 313cafeedd8e9898a4868a504af60d23
BLAKE2b-256 876da753abed29e447e6dadd516413b44cdf0986a47de59a4f12061643685f78

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