Metadata-Version: 2.1
Name: nano_wait
Version: 0.0.2
Summary: Waiting Time Calculation for Automations Based on WiFi and PC Processing
Author: Luiz Filipe Seabra de Marco
Author-email: luizfilipeseabra@icloud.com
License: MIT License
Keywords: automation automação wifi wait
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: psutil
Requires-Dist: pywifi

<<<<<<< HEAD
# Nano-Wait Library Documentation

## Overview

The Nano-Wait library is designed to automate PC tasks by dynamically calculating the wait time between actions based on system performance and WiFi signal strength. This library is particularly useful for scripting and automation tasks where timing is critical, and variations in system resources and network conditions can impact the execution of actions.

## Installation

To use the Nano-Wait library, ensure that the necessary dependencies are installed:
```bash
pip install pywifi psutil
```

## Initialization

Before using the Nano-Wait library, you need to create an instance of the PCAutomation class. This instance will provide methods to calculate wait times based on your PC's performance and WiFi signal strength.

```
from biblioteca import PCAutomation

# Initialize the automation
automation = PCAutomation()
```
## Parameters

speed
Type: int
Range: 1 to 10
Description: This parameter controls the desired speed of automation. A value of 1 represents the slowest speed with the longest wait times, while a value of 10 represents the fastest speed with the shortest wait times. Adjust this parameter based on your specific requirements and system performance.

## Main Functions

wait_wifi(speed)
Description: Calculates the necessary wait time between actions when considering both PC performance and WiFi signal strength.
Parameters:
speed (int): A value between 1 and 10 that controls the speed of automation.
Returns: The calculated wait time in seconds as a float.

Below is an example of how to use the Nano-Wait library in a Python automation script:

```
import pyautogui
import time
from biblioteca import PCAutomation

# Initialize the automation
automation = PCAutomation()

# Set the desired speed of automation
speed = 1

# Press the Windows key and wait for the appropriate time
wait_time = automation.wait_n_wifi(speed=speed)
pyautogui.press('win')
time.sleep(wait_time)

# Type 'chrome' and wait for the appropriate time
wait_time = automation.wait_n_wifi(speed=speed)
pyautogui.write('chrome', interval=0.1)
time.sleep(wait_time)

# Press 'Enter' to open Chrome and wait for the appropriate time
wait_time = automation.wait_wifi(speed=speed)
pyautogui.press('enter')
time.sleep(wait_time)  # Wait for Chrome to open

# Type the URL of YouTube and wait for the appropriate time
wait_time = automation.wait_wifi(speed=speed)
pyautogui.write('youtube.com', interval=0.1)
time.sleep(wait_time)

# Press 'Enter' to go to YouTube and wait for the appropriate time
wait_time = automation.wait_n_wifi(speed=speed)
pyautogui.press('enter')
Detailed Functionality
get_wifi_signal()
Description: Scans the available WiFi networks and returns a score (0-10) based on the signal strength of a specified WiFi network.
Internal Usage: Used within the wait_wifi function to determine the WiFi score.
get_pc_score()
Description: Computes a score (0-10) based on CPU and memory usage, indicating the PC's performance.
Internal Usage: Used within both wait_wifi and wait_n_wifi functions to determine the PC performance score.
Conclusion
The Nano-Wait library provides a simple yet powerful way to manage wait times in PC automation scripts by dynamically adjusting based on system and network conditions. By configuring the speed parameter, users can control the pace of automation to match their specific needs.
```
=======
# NanoWait

**NanoWait** Ã© uma biblioteca Python para automaÃ§Ã£o de tarefas com ajuste dinÃ¢mico do tempo de espera com base na qualidade da conexÃ£o WiFi e no desempenho do computador. Ã‰ ideal para situaÃ§Ãµes onde o tempo de espera deve ser ajustado de acordo com a condiÃ§Ã£o da rede e do sistema para garantir que as operaÃ§Ãµes de automaÃ§Ã£o sejam executadas suavemente.

**Requisitos**
Antes de usar o NanoWait, vocÃª deve instalar as seguintes bibliotecas:

    pywifi: Para verificar a qualidade do sinal WiFi.
    psutil: Para monitorar o desempenho do sistema.
    pyautogui: Para realizar aÃ§Ãµes de automaÃ§Ã£o no computador.

**Principais FunÃ§Ãµes**
wait_wifi: Ela deve ser passada junto com speed e ssid. Ela calcula o tempo de espera considerando o Wifi e o processamento do PC.
wait_n_wifi: Ela deve ser passada junto com speed. Ela calcula o tempo de espera considerando o processamento do PC no momento.
>>>>>>> 01ab9c961b388fc5b69865a3b28d04b4be6679c2
