A growing collection of tools: an inline questionary-based network adapter picker.
Project description
xiepengcheng
Python 工具集合,目前包含:
select_network_adapter:基于 questionary 的内联(非全屏)网络适配器选择器(仅支持 Windows)
pip install xiepengcheng
网络适配器选择
import xiepengcheng
adapter = xiepengcheng.select_network_adapter()
if adapter:
print(adapter.name, adapter.ip_addresses, adapter.mac_address, adapter.is_up)
也可以跳过交互,直接拿列表自己处理:
from xiepengcheng import list_network_adapters
for a in list_network_adapters():
print(a.name, a.description, a.mac_address, a.ip_addresses, a.status)
NetworkAdapter 字段:id(系统级标识符,程序里应该用它而不是 name 来指定网卡)、name、description、mac_address、ip_addresses、status、speed,以及派生属性 is_up。
选择界面里,[Up] 显示为绿色,其他状态显示为红色。
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
xiepengcheng-0.5.0.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xiepengcheng-0.5.0.tar.gz.
File metadata
- Download URL: xiepengcheng-0.5.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c4e25fcc891194bec7f6201effa9da5ab8aba0d80d5fecbcdc63cf28550e785
|
|
| MD5 |
53e9c1c5fa35b1f044ba88bf5277680a
|
|
| BLAKE2b-256 |
ca597d1a1c31bb3354a594d11ccf6db468cf2e8f6cc0ec5d32dbadd4b517b132
|
File details
Details for the file xiepengcheng-0.5.0-py3-none-any.whl.
File metadata
- Download URL: xiepengcheng-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf7e59b9d3eb406657ea16681335da11e99bdca9022507ee99e65e68007b720
|
|
| MD5 |
474f65089503c487b35708f50e8a18c0
|
|
| BLAKE2b-256 |
d7c9be8eec724966c105e8ef3d9334f6a4c36aadeb93205ab5987627db76e509
|