This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Project Description
# Dnspy
### A library for domain name manipulation


_Dnspy_ offers functionality to manipulate fully qualified domain names (FQDNs), such as
extracting _subdomains_ and _domain labels_ from a FQDN.


1. To install _Dnspy_, first download the compressed tar ball _dnspy-1.0.tar.gz_

2. Untar the downloaded file:
$ tar xvzf dnspy-1.0.tar.gz

3. Install the library
$ cd dnspy-1.0
$ python install


The following examples illustrate the use of this module:

# Using the Dnspy module to get sub-domains of a domain, given the default effective
# top-level domain (ETLD) list

>>> from dnspy.dnspy import Dnspy
>>> d = Dnspy() # Load the default ETLD list from Mozilla
>>> d.subdoms('')
['com', '', '']

>>> d.subdoms('', n = 4)
['com', '', '', '']

>>> d.subdoms('', n = -1)

>>> d.domlabels('')
['com', 'google', 'd']

>>> d.domlabels('', n = 4)
['com', 'google', 'd', 'c']


To illustrate the use of a custom ETLD list:

$ cat /tmp/custom_etlds.txt
Now use the custom ETLD list:
>>> from dnspy.dnspy import Dnspy
>>> d = Dnspy(etld_url='file:///tmp/custom_etlds.txt')
>>> d.subdoms('')
['testetld', 'google.testetld', '']

The `etld_url` parameter passed to the Dnspy constructor, can point to any
valid URL, including http URLs.

To run unit tests:
$ cd test/
$ python -m unittest test_dnspy
Ran 3 tests in 2.813s




To uninstall, remove the directory from the disk. On debian systems, for instance:

$ rm -rf /usr/local/lib/python2.7/dist-packages/dnspy

Copyright © 2013 Sandeep Yadav (Damballa)

Distributed under the BSD license

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dnspy-1.0.tar.gz (38.1 kB) Copy SHA256 Checksum SHA256 Source Nov 13, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting