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),
SRV(host='192.168.1.102', port=11211, priority=1, weight=0),
SRV(host='192.168.1.120', port=11211, priority=1, weight=0),
SRV(host='192.168.1.126', port=11211, priority=1, weight=0)]
>>>
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-1.0.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for srvlookup-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01fd0ca6122f125d4e48df4eade4fbcb5d5345212465a0db249b8f39317a553e |
|
MD5 | f706180ec17c645b9fc7da3615b7536c |
|
BLAKE2b-256 | c0f967cf71a2ab76c29a5d7eeeb18b969dd71c892dba20feacc77042acb42b2a |