"""
nano_wait.py
Official Nano-Wait Library: Precise and Adaptive Waiting in Python ⚡
Description: This library allows you to perform adaptive waiting based on the current performance of your computer
### 📦 Installation
⚠️ To download it is necessary to have two libraries to work, run in the terminal 'pip install psutil pywifi⚠️
### Compatibility
⚠️ Compatibility: For now it only works on Windows, we are working on it now :) ⚠️
### Version
Version: 1.2
License: MIT
### formulas
Formulas used in the NanoWait library:
1) PC Score Calculation:
Evaluates how "free" your computer is based on CPU and memory usage::
cpu_score = max(0, min(10, 10 - cpu_usage / 10))
memory_score = max(0, min(10, 10 - memory_usage / 10))
pc_score = (cpu_score + memory_score) / 2
2) Wi-Fi Score calculation:
Converts Wi-Fi signal strength (in dBm) to a scale of 0 to 10:
wifi_score = max(0, min(10, (signal_strength + 100) / 10))
Example: If the signal is -60 dBm,
wifi_score = (-60 + 100) / 10 = 4
3) Combined Risk Score Calculation (PC + Wi-Fi):
risk_score = (pc_score + wifi_score) / 2
4) Wi-Fi standby time (wait_wifi):
wait_time = max(1, (10 - risk_score) / speed)
5) Waiting time without Wi-Fi (wait_n_wifi):
wait_time = max(1, (10 - pc_score) / speed)
Variable legend:
| Variable | Description |
|------------------|---------------------------------------|
| cpu_usage | Current CPU usage (%) |
| memory_usage | Current RAM usage (%) |
| signal_strength | Wi-Fi signal strength (in dBm) |
| speed | Speed factor (example: 1 to 10) |
"""
import pywifi
import psutil
import time
class NanoWait:
"""
Core class of the Nano-Wait library.
Allows you to calculate wait times based on the machine's current performance and Wi-Fi quality.
"""
def __init__(self):
"""
Initializes Wi-Fi modules, if available.
"""
self.wifi = pywifi.PyWiFi()
self.interface = self.wifi.interfaces()[0]
def get_wifi_signal(self, ssid: str) -> float:7
"""Returns a score from 0 to 10 based on the Wi-Fi signal strength for the given SSID.
Args:
ssid (str): Name of the Wi-Fi network to be analyzed.
Returns:
float: Wi-Fi quality rating between 0 (poor) and 10 (excellent).
"""
try:
self.interface.scan()
time.sleep(2) # Wait for the scan to complete
scan_results = self.interface.scan_results()
signal_strength = -100 # Default weak signal value
for network in scan_results:
if network.ssid == ssid:
signal_strength = network.signal
break
else:
raise ValueError(f"Wi-Fi network '{ssid}' not found.")
wifi_score = max(0, min(10, (signal_strength + 100) / 10))
return wifi_score
except Exception as e:
print(f"[WiFi Error] {e}")
return 0
def get_pc_score(self) -> float:
"""
Returns a score from 0 to 10 based on current CPU and RAM usage.
Returns:
float: Rating between 0 (overload) and 10 (light performance).
"""
try:
cpu_usage = psutil.cpu_percent(interval=1)
memory_usage = psutil.virtual_memory().percent
cpu_score = max(0, min(10, 10 - cpu_usage / 10))
memory_score = max(0, min(10, 10 - memory_usage / 10))
pc_score = (cpu_score + memory_score) / 2
return pc_score
except Exception as e:
print(f"[PC Score Error] {e}")
return 0
def wait_wifi(self, speed: float, ssid: str) -> float:
"""
Calculates the wait time based on PC performance and Wi-Fi quality.
Args:
speed (float): Speed factor. Higher values result in shorter wait times.
ssid (str): Name of the Wi-Fi network to be analyzed.
Returns:
float: Recommended wait time.
"""
try:
pc_score = self.get_pc_score()
wifi_score = self.get_wifi_signal(ssid)
risk_score = (pc_score + wifi_score) / 2
wait_time = max(1, (10 - risk_score) / speed)
return wait_time
except Exception as e:
print(f"[Wait_wifi Error] {e}")
return 1
def wait_n_wifi(self, speed: float) -> float:
"""
Calculates the wait time based only on the PC's performance (no Wi-Fi).
Args:
speed (float): Speed factor.
Returns:
float: Recommended wait time.
"""
try:
pc_score = self.get_pc_score()
wait_time = max(1, (10 - pc_score) / speed)
return wait_time
except Exception as e:
print(f"[Error wait_n_wifi] {e}")
return 1
def nano_wait(self, t: float, use_wifi: bool = False, ssid: str = "", speed: float = 1.5) -> None:
"""
Main library function. Adaptively waits for precisely t seconds.
The wait is divided between passive time (with time.sleep) and active time (status check).
Args:
t (float): Desired total wait time, in seconds.
use_wifi (bool): If True, considers the Wi-Fi network status in the analysis.
ssid (str): Wi-Fi network name (required if use_wifi=True).
speed (float): Adaptive speed. Higher values result in shorter waits.
"""
try:
if use_wifi:
if not ssid:
raise ValueError("SSID required when use_wifi=True")
wait_time = self.wait_wifi(speed, ssid)
else:
wait_time = self.wait_n_wifi(speed)
t_passive = max(0, t - wait_time)
t_active = min(t, wait_time)
time.sleep(t_passive)
start = time.time()
while (time.time() - start) < t_active:
continue # Active wait — ensures accuracy at the end of the wait
except Exception as e:
print(f"[Error nano_wait] {e}")
time.sleep(t) # fallback: simple wait
# Usage examples (to put in a separate file or test interactively):
# Usage example without Wi-Fi
# import time
# from nano_wait.nano_wait import NanoWait
# automation = NanoWait()
# speeds = 10
# wait_time = automation.wait_n_wifi(speed=speeds)
# time.sleep(wait_time)
# Usage example with Wi-Fi
# ssid = "WiFiNetworkName"
# wait_time = automation.wait_wifi(speed=speeds, ssid=ssid)
# time.sleep(wait_time)
# How much more efficient would it be?
# Efficiency Comparison: NanoWait vs. Fixed Wait (Guess)
This snippet mathematically explains how much the NanoWait library can improve wait time efficiency compared to a fixed wait performed by "guessing."
---
## Formula for calculating adaptive wait time (NanoWait)
For Wi-Fi, the wait time is calculated by:
\[
wait\_time = \max\left(min\_wait, \frac{10 - risk\_score}{speed}\right)
\]
Where:
- \( risk\_score = \frac{pc\_score + wifi\_score}{2} \) — combined score of the computer's performance and Wi-Fi network quality (varies between 0 and 10).
- \( speed \) — configurable factor that indicates the desired speed (higher values generate shorter wait times).
- \( min\_wait \) — minimum wait time allowed (example: 0.05 seconds).
---
## Percentage Gain Calculation
The percentage gain in efficiency, comparing the fixed wait \( t_{fixed} \) with the adaptive wait time \( wait\_time \), is:
\[
G = \frac{t_{fixed} - wait\_time}{t_{fixed}} \times 100\%
\]
---
## Example Scenarios
### Scenario A — Very Good PC and Wi-Fi
- \( pc\_score = 9 \)
- \( wifi\_score = 9 \)
- \( risk\_score = 9 \)
- \( speed = 10 \)
- \( min\_wait = 0.05 \) seconds
Calculating the wait time:
\[
wait\_time = \max(0.05, \frac{10 - 9}{10}) = \max(0.05, 0.1) = 0.1 \text{ seconds}
\]
If the fixed time is 0.2 seconds, the gain is:
\[
G = \frac{0.2 - 0.1}{0.2} \times 100\% = 50\%
\]
**Conclusion:** NanoWait halves the wait time.
---
### Scenario B — Reasonable PC and Poor Wi-Fi
- \( pc\_score = 5 \)
- \( wifi\_score = 3 \)
- \( risk\_score = 4 \)
- \( speed = 5 \)
- \( min\_wait = 0.05 \) seconds
Calculating the wait time:
\[
wait\_time = \max(0.05, \frac{10 - 4}{5}) = \max(0.05, 1.2) = 1.2 \text{ seconds}
\]
If the fixed time is 1 second, the gain is:
\[
G = \frac{1 - 1.2}{1} \times 100\% = -20\%
\]
**Conclusion:** Longer wait to ensure stability, which is important to avoid errors.
---
### Scenario C — Good PC, Average Wi-Fi
- \( pc\_score = 8 \)
- \( wifi\_score = 5 \)
- \( risk\_score = 6.5 \)
- \( speed = 10 \)
- \( min\_wait = 0.05 \) seconds
Calculating the wait time:
\[
wait\_time = \max(0.05, \frac{10 - 6.5}{10}) = \max(0.05, 0.35) = 0.35 \text{ seconds}
\]
If the fixed time is 0.5 seconds, the gain is:
\[
G = \frac{0.5 - 0.35}{0.5} \times 100\% = 30%
\]
**Conclusion:** 30% savings in total wait time.
---
## Summary
| Condition | Estimated Gain (%) |
|-------------------|-----------------------------------|
| Very good PC and Wi-Fi | Up to 50% reduction in wait time |
| Reasonable PC, poor Wi-Fi | Can increase the time for robustness |
| Good PC, average Wi-Fi | Approximately 20% to 35% savings |
---
## Practical Benefits of NanoWait
- **Adaptive time savings**: wait time decreases when the system is under stress.
- **Robustness**: time increases when the system is under stress, avoiding errors.
- **Customization**: the `speed` parameter allows you to adjust the behavior to your needs.
---
In other words, on average, it's a 20% to 50% increase in efficiency.
---
### ⚠️ Error Handling
The **Nano-Wait** library is designed with robust fallback mechanisms to ensure stability, even under unexpected conditions.
#### ✅ How the library behaves in case of failures:
| Scenario | Behavior |
|---------------------------------|--------------------------------------------------------------------------|
| **Wi-Fi network not found** | Returns a Wi-Fi score of `0` and logs: `[WiFi Error]` |
| **CPU or RAM usage unavailable**| Returns a PC score of `0` and logs: `[PC Score Error]` |
| **Unexpected internal error** | Falls back to `time.sleep(t)` and logs: `[Error nano_wait]` |
#### 🔐 Why this matters:
- Ensures **safe execution** even when the system is under high load or lacks necessary permissions.
- Avoids crashes by using default behaviors in case of unexpected conditions.
- Ideal for **automation scripts** and **real-time systems** that require reliability and resilience.
### Authors
Author: Luiz Filipe Seabra de Marco and Vitor Seabra
(and optionally the Wi-Fi network), ideal for applications that disable more intelligent waiting time control.Official Nano-Wait Library: Accurate and Adaptive Waiting in Python ⚡
Raw data
{
"_id": null,
"home_page": null,
"name": "nano-wait",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "automation automa\u00e7\u00e3o wifi wait",
"author": "Luiz Filipe Seabra de Marco",
"author_email": "luizfilipeseabra@icloud.com",
"download_url": "https://files.pythonhosted.org/packages/39/29/d4201378bdfecd17674b4085470e2b25823ff5035485c4d09681a8dbe5a2/nano_wait-1.3.tar.gz",
"platform": null,
"description": "\"\"\"\r\nnano_wait.py\r\n\r\nOfficial Nano-Wait Library: Precise and Adaptive Waiting in Python \u26a1\r\n\r\nDescription: This library allows you to perform adaptive waiting based on the current performance of your computer\r\n\r\n### \ud83d\udce6 Installation\r\n\r\n\r\n\u26a0\ufe0f To download it is necessary to have two libraries to work, run in the terminal 'pip install psutil pywifi\u26a0\ufe0f \r\n\r\n### Compatibility\r\n\r\n\u26a0\ufe0f Compatibility: For now it only works on Windows, we are working on it now :) \u26a0\ufe0f \r\n\r\n### Version\r\n\r\nVersion: 1.2\r\nLicense: MIT\r\n\r\n### formulas\r\n\r\nFormulas used in the NanoWait library:\r\n\r\n1) PC Score Calculation:\r\nEvaluates how \"free\" your computer is based on CPU and memory usage:: \r\n\r\ncpu_score = max(0, min(10, 10 - cpu_usage / 10)) \r\n\r\nmemory_score = max(0, min(10, 10 - memory_usage / 10)) \r\n\r\npc_score = (cpu_score + memory_score) / 2\r\n\r\n2) Wi-Fi Score calculation:\r\nConverts Wi-Fi signal strength (in dBm) to a scale of 0 to 10: \r\n\r\nwifi_score = max(0, min(10, (signal_strength + 100) / 10)) \r\n\r\nExample: If the signal is -60 dBm, \r\nwifi_score = (-60 + 100) / 10 = 4\r\n\r\n3) Combined Risk Score Calculation (PC + Wi-Fi): \r\n\r\nrisk_score = (pc_score + wifi_score) / 2\r\n\r\n4) Wi-Fi standby time (wait_wifi): \r\n\r\nwait_time = max(1, (10 - risk_score) / speed)\r\n\r\n5) Waiting time without Wi-Fi (wait_n_wifi): \r\n\r\nwait_time = max(1, (10 - pc_score) / speed)\r\n\r\nVariable legend:\r\n\r\n| Variable | Description |\r\n|------------------|---------------------------------------|\r\n| cpu_usage | Current CPU usage (%) |\r\n| memory_usage | Current RAM usage (%) |\r\n| signal_strength | Wi-Fi signal strength (in dBm) |\r\n| speed | Speed factor (example: 1 to 10) |\r\n\"\"\"\r\n\r\nimport pywifi\r\nimport psutil\r\nimport time\r\n\r\n\r\nclass NanoWait: \r\n\"\"\" \r\nCore class of the Nano-Wait library.\r\nAllows you to calculate wait times based on the machine's current performance and Wi-Fi quality. \r\n\"\"\" \r\n\r\ndef __init__(self): \r\n\"\"\" \r\nInitializes Wi-Fi modules, if available.\r\n\"\"\" \r\nself.wifi = pywifi.PyWiFi() \r\nself.interface = self.wifi.interfaces()[0] \r\n\r\ndef get_wifi_signal(self, ssid: str) -> float:7 \r\n\r\n\"\"\"Returns a score from 0 to 10 based on the Wi-Fi signal strength for the given SSID. \r\n\r\nArgs: \r\nssid (str): Name of the Wi-Fi network to be analyzed. \r\n\r\nReturns: \r\nfloat: Wi-Fi quality rating between 0 (poor) and 10 (excellent). \r\n\"\"\" \r\ntry: \r\nself.interface.scan() \r\ntime.sleep(2) # Wait for the scan to complete \r\nscan_results = self.interface.scan_results() \r\n\r\nsignal_strength = -100 # Default weak signal value \r\n\r\nfor network in scan_results: \r\nif network.ssid == ssid: \r\nsignal_strength = network.signal \r\nbreak \r\nelse: \r\nraise ValueError(f\"Wi-Fi network '{ssid}' not found.\") \r\n\r\nwifi_score = max(0, min(10, (signal_strength + 100) / 10)) \r\nreturn wifi_score \r\n\r\nexcept Exception as e: \r\nprint(f\"[WiFi Error] {e}\") \r\nreturn 0 \r\n\r\ndef get_pc_score(self) -> float: \r\n\"\"\" \r\nReturns a score from 0 to 10 based on current CPU and RAM usage. \r\n\r\nReturns: \r\nfloat: Rating between 0 (overload) and 10 (light performance). \r\n\"\"\" \r\ntry: \r\ncpu_usage = psutil.cpu_percent(interval=1) \r\nmemory_usage = psutil.virtual_memory().percent \r\n\r\ncpu_score = max(0, min(10, 10 - cpu_usage / 10)) \r\nmemory_score = max(0, min(10, 10 - memory_usage / 10)) \r\n\r\npc_score = (cpu_score + memory_score) / 2 \r\nreturn pc_score \r\n\r\nexcept Exception as e:\r\nprint(f\"[PC Score Error] {e}\")\r\nreturn 0\r\n\r\ndef wait_wifi(self, speed: float, ssid: str) -> float:\r\n\"\"\"\r\nCalculates the wait time based on PC performance and Wi-Fi quality.\r\n\r\nArgs:\r\nspeed (float): Speed factor. Higher values result in shorter wait times.\r\nssid (str): Name of the Wi-Fi network to be analyzed.\r\n\r\nReturns:\r\nfloat: Recommended wait time.\r\n\"\"\"\r\ntry:\r\npc_score = self.get_pc_score()\r\nwifi_score = self.get_wifi_signal(ssid)\r\n\r\nrisk_score = (pc_score + wifi_score) / 2\r\nwait_time = max(1, (10 - risk_score) / speed)\r\nreturn wait_time\r\n\r\nexcept Exception as e:\r\nprint(f\"[Wait_wifi Error] {e}\")\r\nreturn 1\r\n\r\ndef wait_n_wifi(self, speed: float) -> float:\r\n\"\"\"\r\nCalculates the wait time based only on the PC's performance (no Wi-Fi).\r\n\r\nArgs:\r\nspeed (float): Speed factor.\r\n\r\nReturns:\r\nfloat: Recommended wait time.\r\n\"\"\"\r\ntry:\r\npc_score = self.get_pc_score()\r\nwait_time = max(1, (10 - pc_score) / speed)\r\nreturn wait_time\r\n\r\nexcept Exception as e:\r\nprint(f\"[Error wait_n_wifi] {e}\")\r\nreturn 1\r\n\r\ndef nano_wait(self, t: float, use_wifi: bool = False, ssid: str = \"\", speed: float = 1.5) -> None:\r\n\"\"\"\r\nMain library function. Adaptively waits for precisely t seconds.\r\n\r\nThe wait is divided between passive time (with time.sleep) and active time (status check).\r\n\r\nArgs:\r\nt (float): Desired total wait time, in seconds.\r\nuse_wifi (bool): If True, considers the Wi-Fi network status in the analysis.\r\nssid (str): Wi-Fi network name (required if use_wifi=True).\r\nspeed (float): Adaptive speed. Higher values result in shorter waits.\r\n\"\"\"\r\ntry:\r\nif use_wifi:\r\nif not ssid:\r\nraise ValueError(\"SSID required when use_wifi=True\")\r\nwait_time = self.wait_wifi(speed, ssid)\r\nelse:\r\nwait_time = self.wait_n_wifi(speed)\r\n\r\nt_passive = max(0, t - wait_time)\r\nt_active = min(t, wait_time)\r\n\r\ntime.sleep(t_passive)\r\n\r\nstart = time.time()\r\nwhile (time.time() - start) < t_active:\r\ncontinue # Active wait \u2014 ensures accuracy at the end of the wait\r\n\r\nexcept Exception as e:\r\nprint(f\"[Error nano_wait] {e}\")\r\ntime.sleep(t) # fallback: simple wait\r\n\r\n# Usage examples (to put in a separate file or test interactively):\r\n\r\n# Usage example without Wi-Fi\r\n# import time\r\n# from nano_wait.nano_wait import NanoWait\r\n\r\n# automation = NanoWait()\r\n# speeds = 10\r\n# wait_time = automation.wait_n_wifi(speed=speeds)\r\n# time.sleep(wait_time)\r\n\r\n# Usage example with Wi-Fi\r\n# ssid = \"WiFiNetworkName\"\r\n# wait_time = automation.wait_wifi(speed=speeds, ssid=ssid)\r\n# time.sleep(wait_time)\r\n\r\n# How much more efficient would it be?\r\n# Efficiency Comparison: NanoWait vs. Fixed Wait (Guess)\r\n\r\nThis snippet mathematically explains how much the NanoWait library can improve wait time efficiency compared to a fixed wait performed by \"guessing.\"\r\n\r\n---\r\n\r\n## Formula for calculating adaptive wait time (NanoWait)\r\n\r\nFor Wi-Fi, the wait time is calculated by:\r\n\r\n\\[\r\nwait\\_time = \\max\\left(min\\_wait, \\frac{10 - risk\\_score}{speed}\\right)\r\n\\]\r\n\r\nWhere:\r\n\r\n- \\( risk\\_score = \\frac{pc\\_score + wifi\\_score}{2} \\) \u2014 combined score of the computer's performance and Wi-Fi network quality (varies between 0 and 10).\r\n- \\( speed \\) \u2014 configurable factor that indicates the desired speed (higher values generate shorter wait times).\r\n- \\( min\\_wait \\) \u2014 minimum wait time allowed (example: 0.05 seconds).\r\n\r\n---\r\n\r\n## Percentage Gain Calculation\r\n\r\nThe percentage gain in efficiency, comparing the fixed wait \\( t_{fixed} \\) with the adaptive wait time \\( wait\\_time \\), is:\r\n\r\n\\[\r\nG = \\frac{t_{fixed} - wait\\_time}{t_{fixed}} \\times 100\\%\r\n\\]\r\n\r\n---\r\n\r\n## Example Scenarios\r\n\r\n### Scenario A \u2014 Very Good PC and Wi-Fi\r\n\r\n- \\( pc\\_score = 9 \\)\r\n- \\( wifi\\_score = 9 \\)\r\n- \\( risk\\_score = 9 \\)\r\n- \\( speed = 10 \\)\r\n- \\( min\\_wait = 0.05 \\) seconds\r\n\r\nCalculating the wait time:\r\n\r\n\\[\r\nwait\\_time = \\max(0.05, \\frac{10 - 9}{10}) = \\max(0.05, 0.1) = 0.1 \\text{ seconds}\r\n\\]\r\n\r\nIf the fixed time is 0.2 seconds, the gain is:\r\n\r\n\\[\r\nG = \\frac{0.2 - 0.1}{0.2} \\times 100\\% = 50\\%\r\n\\]\r\n\r\n**Conclusion:** NanoWait halves the wait time.\r\n\r\n---\r\n\r\n### Scenario B \u2014 Reasonable PC and Poor Wi-Fi\r\n\r\n- \\( pc\\_score = 5 \\)\r\n- \\( wifi\\_score = 3 \\)\r\n- \\( risk\\_score = 4 \\)\r\n- \\( speed = 5 \\)\r\n- \\( min\\_wait = 0.05 \\) seconds\r\n\r\nCalculating the wait time:\r\n\r\n\\[\r\nwait\\_time = \\max(0.05, \\frac{10 - 4}{5}) = \\max(0.05, 1.2) = 1.2 \\text{ seconds}\r\n\\]\r\n\r\nIf the fixed time is 1 second, the gain is:\r\n\r\n\\[\r\nG = \\frac{1 - 1.2}{1} \\times 100\\% = -20\\%\r\n\\]\r\n\r\n**Conclusion:** Longer wait to ensure stability, which is important to avoid errors.\r\n\r\n---\r\n\r\n### Scenario C \u2014 Good PC, Average Wi-Fi\r\n\r\n- \\( pc\\_score = 8 \\)\r\n- \\( wifi\\_score = 5 \\)\r\n- \\( risk\\_score = 6.5 \\)\r\n- \\( speed = 10 \\)\r\n- \\( min\\_wait = 0.05 \\) seconds\r\n\r\nCalculating the wait time:\r\n\r\n\\[\r\nwait\\_time = \\max(0.05, \\frac{10 - 6.5}{10}) = \\max(0.05, 0.35) = 0.35 \\text{ seconds}\r\n\\]\r\n\r\nIf the fixed time is 0.5 seconds, the gain is:\r\n\r\n\\[\r\nG = \\frac{0.5 - 0.35}{0.5} \\times 100\\% = 30%\r\n\\]\r\n\r\n**Conclusion:** 30% savings in total wait time.\r\n\r\n---\r\n## Summary\r\n\r\n| Condition | Estimated Gain (%) |\r\n|-------------------|-----------------------------------|\r\n| Very good PC and Wi-Fi | Up to 50% reduction in wait time |\r\n| Reasonable PC, poor Wi-Fi | Can increase the time for robustness |\r\n| Good PC, average Wi-Fi | Approximately 20% to 35% savings |\r\n\r\n---\r\n\r\n## Practical Benefits of NanoWait\r\n\r\n- **Adaptive time savings**: wait time decreases when the system is under stress.\r\n- **Robustness**: time increases when the system is under stress, avoiding errors.\r\n- **Customization**: the `speed` parameter allows you to adjust the behavior to your needs.\r\n\r\n---\r\n\r\nIn other words, on average, it's a 20% to 50% increase in efficiency.\r\n\r\n---\r\n\r\n### \u26a0\ufe0f Error Handling\r\n\r\nThe **Nano-Wait** library is designed with robust fallback mechanisms to ensure stability, even under unexpected conditions.\r\n\r\n#### \u2705 How the library behaves in case of failures:\r\n\r\n| Scenario | Behavior |\r\n|---------------------------------|--------------------------------------------------------------------------|\r\n| **Wi-Fi network not found** | Returns a Wi-Fi score of `0` and logs: `[WiFi Error]` |\r\n| **CPU or RAM usage unavailable**| Returns a PC score of `0` and logs: `[PC Score Error]` |\r\n| **Unexpected internal error** | Falls back to `time.sleep(t)` and logs: `[Error nano_wait]` |\r\n\r\n#### \ud83d\udd10 Why this matters:\r\n\r\n- Ensures **safe execution** even when the system is under high load or lacks necessary permissions.\r\n- Avoids crashes by using default behaviors in case of unexpected conditions.\r\n- Ideal for **automation scripts** and **real-time systems** that require reliability and resilience.\r\n\r\n### Authors\r\n\r\nAuthor: Luiz Filipe Seabra de Marco and Vitor Seabra\r\n(and optionally the Wi-Fi network), ideal for applications that disable more intelligent waiting time control.Official Nano-Wait Library: Accurate and Adaptive Waiting in Python \u26a1\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Waiting Time Calculation for Automations Based on WiFi and PC Processing",
"version": "1.3",
"project_urls": null,
"split_keywords": [
"automation",
"automa\u00e7\u00e3o",
"wifi",
"wait"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01a8b0a882d983ead011774a8d19c91080395d8ad3cf2eb0b9c4c80d7cd7d77e",
"md5": "b3d4558b39e300bd4b29c9d8f44d79a9",
"sha256": "35bb4d4d2b111f5e3d0f16f6962c66dd7727206d793c189fc36c3c6e67cfb7c1"
},
"downloads": -1,
"filename": "nano_wait-1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b3d4558b39e300bd4b29c9d8f44d79a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6445,
"upload_time": "2025-08-02T16:28:28",
"upload_time_iso_8601": "2025-08-02T16:28:28.161166Z",
"url": "https://files.pythonhosted.org/packages/01/a8/b0a882d983ead011774a8d19c91080395d8ad3cf2eb0b9c4c80d7cd7d77e/nano_wait-1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3929d4201378bdfecd17674b4085470e2b25823ff5035485c4d09681a8dbe5a2",
"md5": "29d9ca47151821b36169948cdde804c1",
"sha256": "e3cebbf4c159a856547dd0e818a24d75ea6c73dcea4cc8cfd3d2e99b09b6feb2"
},
"downloads": -1,
"filename": "nano_wait-1.3.tar.gz",
"has_sig": false,
"md5_digest": "29d9ca47151821b36169948cdde804c1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6259,
"upload_time": "2025-08-02T16:28:29",
"upload_time_iso_8601": "2025-08-02T16:28:29.015372Z",
"url": "https://files.pythonhosted.org/packages/39/29/d4201378bdfecd17674b4085470e2b25823ff5035485c4d09681a8dbe5a2/nano_wait-1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-02 16:28:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nano-wait"
}