使用DNS SRV记录进行服务查找
项目描述
为dnspython创建的一个小型包装器,以列表形式返回指定主机、协议和域名名的SRV记录作为namedtuples。
安装
srvlookup可在Python包索引中找到。只需
pip install srvlookup
示例
>>> import srvlookup
>>> srvlookup.lookup('api', 'memcached')
[SRV(host='192.169.1.100', port=11211, priority=1, weight=0, host='memcache1.local'),
SRV(host='192.168.1.102', port=11211, priority=1, weight=0, host='memcache2.local'),
SRV(host='192.168.1.120', port=11211, priority=1, weight=0, host='memcache3.local'),
SRV(host='192.168.1.126', port=11211, priority=1, weight=0, host='memcache4.local')]
>>>
测试
python setup.py nosetests
需求
项目详情
关闭
srvlookup-3.0.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8c0d96501df0117bce82ac2076a03a1c450bca43dc4cf83e54b026f6c2ed5c3e |
|
MD5 | ee93f03b133d52d13aba798a4db73c41 |
|
BLAKE2b-256 | 1849f67d6b5bd521ffc5e0019df86a7744cacc643b39345a3c850a7eee038d93 |