Skip to main content

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.

Version Status Coverage License

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for srvlookup, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size srvlookup-2.0.0-py2.py3-none-any.whl (5.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size srvlookup-2.0.0.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page