A Python client for the whois-json API service
Project description
WhoisJSON Python Client
A simple and reusable Python client for the WhoisJSON API service.
Free accounts include 500 requests per month. Check out our full documentation for more details about our API.
Installation
pip install whoisjson
Usage
from whoisjson import WhoisJsonClient
# Initialize the client
client = WhoisJsonClient(api_key="your-api-key")
# 1. WHOIS Lookup
try:
whois_result = client.whois("example.com") # or client.lookup() for backward compatibility
print(whois_result)
except Exception as e:
print(f"Error: {e}")
# 2. DNS Lookup
try:
dns_result = client.nslookup("example.com")
print(dns_result)
except Exception as e:
print(f"Error: {e}")
# 3. SSL Certificate Check
try:
ssl_result = client.ssl_cert_check("example.com")
print(ssl_result)
except Exception as e:
print(f"Error: {e}")
Available Endpoints
The client provides access to the following WhoisJSON API endpoints:
whois(domain)
: Get WHOIS information for a domainnslookup(domain)
: Get DNS records for a domainssl_cert_check(domain)
: Get SSL certificate information for a domain
Features
- Simple and intuitive API
- Type hints for better IDE support
- Proper error handling
- Support for both free and premium API access
- Comprehensive examples included
Examples
Check out the examples
directory for ready-to-use example scripts demonstrating all features.
To run the demo:
python examples/demo.py
Requirements
- Python 3.6+
- requests>=2.25.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
File details
Details for the file whoisjson-0.2.0.tar.gz
.
File metadata
- Download URL: whoisjson-0.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
70a9f7d85721762761a7d6d5a306dcc3a592f319df555c9e79694743106caa0a
|
|
MD5 |
e4e2f9de659675a4d4469514c9f76756
|
|
BLAKE2b-256 |
06f87c3a395792c47b6734534121100ba49aecdc608de2d316ed474a2019e734
|
File details
Details for the file whoisjson-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: whoisjson-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cd4073b2501f87906d6b2a385183473f6908c22eeb081dbb385564f72e35a35a
|
|
MD5 |
b8c6e0b4448f39992cd3c53a1803f34f
|
|
BLAKE2b-256 |
c9ef2c3b09d794b65392996d9e40284cb6ea6f858dd0dfedf6558e40da01e816
|