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.

PyPI version Build Status

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

Download files

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

Source Distribution

srvlookup-0.2.0.tar.gz (5.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page