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

Introducing a Python library anti-afk, designed to simulate user activity, ensuring that your system remains active and does not enter an idle state (AFK). The library periodically moves the mouse pointer and can optionally simulate a key press (defaulting to the Shift key). This functionality delivers several professional benefits:

Enhanced Session Stability: Prevents unwanted session terminations in environments such as VPN connections, remote desktop sessions, and remote debugging, thereby reducing the risk of losing unsaved work.

Operational Continuity: Maintains active sessions across various remote and cloud-based platforms, ensuring that time-sensitive workflows are not disrupted by automatic timeouts or logouts.

Improved Multi-Tasking Efficiency: Supports scenarios where multiple customer sessions or tasks are managed concurrently, enabling uninterrupted work streams and more efficient resource allocation.

By keeping your system’s status active, this library helps safeguard against connectivity disruptions and session timeouts, contributing to a more resilient and productive operational environment.

## 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-lib `

## Example

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

`bash from anti_afk.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.5.tar.gz (4.6 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.5-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anti_afk_lib-0.1.5.tar.gz
  • Upload date:
  • Size: 4.6 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.5.tar.gz
Algorithm Hash digest
SHA256 86a8e2feb6d16a0d1e3df79f46b5e3a271f603a2610f57514af861d45b9b2f0e
MD5 3c061c187d9b34b4f874b002537bc940
BLAKE2b-256 1e3ed2ba0c6d745bf1df7ba59edac7da3206d2767bf26d0cd743a26dd847a699

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anti_afk_lib-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 97eb075e9017a9c98c637132c25635d6247c9e65080c4b06db72a8f99edaab45
MD5 4fcc7a0dfffbc98b69661ea427f47676
BLAKE2b-256 32a488a9b1bd49834ded189df10e5edb53e9a38323076d03b224456adb487742

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