pyrssi
pyrssi is a lightweight Python package for retrieving the current Wi-Fi signal strength (RSSI) on macOS, Windows, and Linux. It automatically detects the operating system and uses the optimal method for each platform.
Features
- Retrieve the current Wi-Fi RSSI (signal strength) in dBm.
- Automatically detects the operating system.
- Supports macOS, Windows, and Linux.
Installation
Install via PyPI
pip install pyrssi
Install from source
git clone https://github.com/yourusername/pyrssi.git
cd pyrssi
pip install .
Usage
import pyrssi
rssi = pyrssi.get_rssi()
if rssi is not None:
print(f"Current Wi-Fi RSSI: {rssi} dBm")
else:
print("Wi-Fi not detected or interface unavailable.")
Returns an integer representing the RSSI in dBm.
Returns None if no Wi-Fi is connected or the interface cannot be accessed.
Platform Support
macOS
- Uses CoreWLAN via pyobjc.
- No sudo required.
- Retrieves the RSSI for the first available Wi-Fi interface.
Windows
- Uses the built-in netsh wlan show interfaces command.
- Parses the output to extract the RSSI.
Linux
- Reads /proc/net/wireless to extract the signal strength.
- No additional dependencies required.
Requirements
- Python 3.7+
- macOS: pyobjc (installed automatically if using pip)
- Windows/Linux: No additional packages required.
License
- MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please open issues or pull requests on GitHub.
Example Output
>>> import pyrssi
>>> print(pyrssi.get_rssi())
-55
Metadata
Release files for pyrssi 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrssi-0.1.1.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrssi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / pyrssi-0.1.1.tar.gz
| Download URL | pyrssi-0.1.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2efa4a288460e43bfb6cff54b85939ec52b13943335bd70cf1233a117b875c7a
|
|
BLAKE2b-256 checksum How to use checksums |
7f465c80eb80a91804ea73bd440945108217995348c0fdb6c7aef62e374d287c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pyrssi-0.1.1-py3-none-any.whl
| Download URL | pyrssi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d21c15d7fab8565e055eea61975d549e12f305e70cb594e68ba74db0ff74ee0
|
|
BLAKE2b-256 checksum How to use checksums |
b41d2c2323aa8e6ee6a147c6046d4bcb271bdadb61968af0210b36c41f050acc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|