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 details)
Built Distribution
File details
Details for the file srvlookup-1.0.0.tar.gz
.
File metadata
- Download URL: srvlookup-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df2aa2905aa22a99222211199502c38cd81d42279ea6efb0032bcb8a21dc7720 |
|
MD5 | 52c1718efc7671b2955c7f8612c4b938 |
|
BLAKE2b-256 | 8763803f7375ef52b2fee26a820739706e130ae8b0479e3e59b4800c06b96ceb |
File details
Details for the file srvlookup-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: srvlookup-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01fd0ca6122f125d4e48df4eade4fbcb5d5345212465a0db249b8f39317a553e |
|
MD5 | f706180ec17c645b9fc7da3615b7536c |
|
BLAKE2b-256 | c0f967cf71a2ab76c29a5d7eeeb18b969dd71c892dba20feacc77042acb42b2a |