Service lookup using DNS SRV records
Project description
A small wrapper for dnspython to return SRV records for a given host, protocol, and domain name as a list of namedtuples.
Installation
srvlookup is available on the Python Package Index. Simply:
pip install srvlookup
Example
>>> 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')]
>>>
Testing
python setup.py nosetests
Requirements
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
srvlookup-2.0.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for srvlookup-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8dd82fdcb567aca7b54922ded5af4bfe70465c54105116b334588ee699a3639 |
|
MD5 | c36342ecade3bce794969bf723ccc6b4 |
|
BLAKE2b-256 | d4b1b727ea3beb5bf257bf9f46b298cd0dd77d653d7a89715913f105f5237137 |