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-3.0.0.tar.gz
(5.2 kB
view details)
File details
Details for the file srvlookup-3.0.0.tar.gz
.
File metadata
- Download URL: srvlookup-3.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0d96501df0117bce82ac2076a03a1c450bca43dc4cf83e54b026f6c2ed5c3e |
|
MD5 | ee93f03b133d52d13aba798a4db73c41 |
|
BLAKE2b-256 | 1849f67d6b5bd521ffc5e0019df86a7744cacc643b39345a3c850a7eee038d93 |