Skip to content

WhoisBuster/std-domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

std-domain

Coverage StatusBuild Status

std-domain is a Python library that intends to provide a simple interface for dealing with International Domain Names (IDN).

It is a simple library that depends on other libraries to provide an interface for handling UTF-8 and standard domain names, and converting between the two.

Installation

The library is available as the std-domain package in PyPI.

You can either install it from pip like:

pip install std-domain

or install it in your application's dependency list.

Usage

from stddomain import Domain

# Full SLD and TLD IDN support
domain = Domain(u'名がドメイン.中国')

print(domain)
> "xn--v8jxj3d1dzdz08w.xn--fiqs8s"

# Printing the domain defaults to punycode
print(domain.domain)
> "xn--v8jxj3d1dzdz08w.xn--fiqs8s"

print(domain.idn)
> "名がドメイン.中国"

print(domain.is_idn)
> True

License

This software is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, which is available here

Copyright © 2016-2017 WhoisBuster

About

A simple Python library for full IDN support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages