Python module to interact with ViewDNS.info API
Project description
viewdns-python
viewdns-python is a Python library for interacting with the ViewDNS.info API.
Installation
Use the package manager pip to install viewdns-python.
pip setup.py install
Usage
import viewdns
client = viewdns.Client('your-api-key')
Features
viewdns-python does not support all the tools yet. Below is a list of what is currently supported:
DNS Record Lookup
dns_records = client.get_dns_records('twitter.com')
print(dns_records) # [<DNSRecord> {name=twitter.com., ttl=293, class_=IN, type=SOA, priority=None, data=ns1.p26.dynect.net. zone-admin.dyndns.com. 2007158928 3600 600 604800 60, class=IN}, ...]
Get HTTP Headers
http_headers = client.get_http_headers('twitter.com')
print(http_headers) # [<HTTPHeader> {name=http_status, value=301}, ...]
IP Location Finder
ip_location = client.get_ip_location('11.11.11.11')
print(ip_location) # <IPLocation> {city=Bullard, zipcode=75757, region_code=TX, country_code=US, country_name=United States, latitude=32.1095, longitude=-95.3342, gmt_offset=, dst_offset=, region_name=Texas}
Testing
Docker
Build the container.
docker build -t viewdns-python-tests .
Run the tests.
docker run viewdns-python-tests
Links
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file viewdns-python-0.0.1.tar.gz.
File metadata
- Download URL: viewdns-python-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ee15cdfc783df609d5e2accc35c898c7998927a0b7031607c1414f5166d222
|
|
| MD5 |
e435dcc35f8c87cf135b3b3863d7b957
|
|
| BLAKE2b-256 |
055a86ff8edadf635fda3bab793beed51c1962affa5181b010f74dfb2681e2f4
|
File details
Details for the file viewdns_python-0.0.1-py3-none-any.whl.
File metadata
- Download URL: viewdns_python-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce8f7715e2699a18d68a6050d96e167ddda2b5eebcec5a324ea7f37f6b829b8d
|
|
| MD5 |
39445229ab712d7e116ab1d327326d1b
|
|
| BLAKE2b-256 |
4312c08f785902d3104e753201c42f9fe1670f2cd737a3f99d9fcaeb4ddca1b0
|