Skip to content

Commit

Permalink
domain_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotvilhelm committed Aug 30, 2018
1 parent a342ecf commit 1e431fd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ This is a major improvement of runtime in relation to other WHOIS packages.

#### Installation
###### Python 2.x
`pip install --index-url https://test.pypi.org/simple/ domain_age`
`pip install --index-url https://test.pypi.org/simple/ domain_validation`
###### Python 3.x
`pip3 install --index-url https://test.pypi.org/simple/ domain_age`
`pip3 install --index-url https://test.pypi.org/simple/ domain_validation`

![pypi](assets/pypi.svg)

#### Usage
The expected use case is for finding the creation date of a domain:
```python
from domain_age.creation_date import get_domain_creation_date
from domain_validation.creation_date import get_domain_creation_date
get_domain_creation_date("google.com")
```
Output: `datetime.date(1997, 9, 15)`

This package is also able to provide raw `WHOIS` query results, although this is not the expected use-case:
```python
from domain_age.whois_client import query_whois
from domain_validation.whois_client import query_whois
query_whois("google.com")
```

Expand Down
4 changes: 2 additions & 2 deletions domain_validation/creation_date.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import re
from domain_age.constants import SERVER_NOT_FOUND, CREATION_DATE_NOT_FOUND
from domain_age.parse_date import parse_date
from domain_validation.constants import SERVER_NOT_FOUND, CREATION_DATE_NOT_FOUND
from domain_validation.parse_date import parse_date


def get_domain_creation_date(whois_record):
Expand Down
2 changes: 1 addition & 1 deletion domain_validation/parse_date.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re
from datetime import datetime
from domain_age.constants import MONTHS
from domain_validation.constants import MONTHS


def parse_date(date):
Expand Down
2 changes: 1 addition & 1 deletion domain_validation/registrar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from domain_age.constants import SERVER_NOT_FOUND, REGISTRAR_NOT_FOUND
from domain_validation.constants import SERVER_NOT_FOUND, REGISTRAR_NOT_FOUND


def get_registrar(whois_record):
Expand Down
2 changes: 1 addition & 1 deletion domain_validation/test/test_whois_obj.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from domain_age.whois import WHOIS
from domain_validation.whois import WHOIS
from time import sleep


Expand Down
6 changes: 3 additions & 3 deletions domain_validation/whois.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from domain_age.whois_client import query_whois
from domain_age.creation_date import get_domain_creation_date
from domain_age.registrar import get_registrar
from domain_validation.whois_client import query_whois
from domain_validation.creation_date import get_domain_creation_date
from domain_validation.registrar import get_registrar


class WHOIS:
Expand Down
2 changes: 1 addition & 1 deletion domain_validation/whois_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import socket
from domain_age.constants import WHOIS_PORTION_SIZE, WHOIS_PORT, WHOIS_RESPONSE_LEN_LIMIT, SERVERS, SERVER_NOT_FOUND
from domain_validation.constants import WHOIS_PORTION_SIZE, WHOIS_PORT, WHOIS_RESPONSE_LEN_LIMIT, SERVERS, SERVER_NOT_FOUND


def query_whois(domain):
Expand Down

0 comments on commit 1e431fd

Please sign in to comment.