Mac OS X airport command result parser
Project description
airport-py
Tiny MacOS only python library to integrate/use wi-fi scan results in your python projects. Wi-Fi scan data gathered by calling & parsing the results of a small MacOS cli utility called "airport".
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
is the default path to program executable. Exporting environment variable AIRPORT_PATH
will update the defaults if you have your executable in a different path.
Installation
pip install airport-py
Usage
import airport
# current connection
print airport.info()
InfoResult(agrCtlRSSI='-64', agrExtRSSI='0', agrCtlNoise='-92', agrExtNoise='0', state='running',
op_mode='station', lastTxRate='702', maxRate='1300', lastAssocStatus='0',
auth_80211='open', auth_link='wpa2-psk', BSSID='d0:3:4b:e9:55:99', SSID='AirPortTimeCapsule',
MCS='5', channel='44,80')
# wi-fi scanning
scan_results = airport.scan()
print map(lambda r: (r.ssid, r.bssid, r.channel), scan_results[:3])
[('kablo-ac', 'fd:4a:e9:6f:95:7e', '52'),
('kablo', 'fd:4a:e9:6f:95:7d', '11'),
('oz-hukuk', '88:31:fd:4e:20:67', '11')]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
airport-py-0.1.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for airport_py-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef894f48eb199d07dd2d8fc77fb81155151edffc75f8f45578e20129e36ccb85 |
|
MD5 | 3ff94b95014c8177dd6317784290529d |
|
BLAKE2b-256 | 750cd8a99a800092e9aa90cdb60067627f9d18f55537a1f762b468fbd99c69ed |