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.
Metadata
Release files for whoisjson 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| whoisjson-0.2.0.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whoisjson-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / whoisjson-0.2.0.tar.gz
| Download URL | whoisjson-0.2.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70a9f7d85721762761a7d6d5a306dcc3a592f319df555c9e79694743106caa0a
|
|
BLAKE2b-256 checksum How to use checksums |
06f87c3a395792c47b6734534121100ba49aecdc608de2d316ed474a2019e734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / whoisjson-0.2.0-py3-none-any.whl
| Download URL | whoisjson-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd4073b2501f87906d6b2a385183473f6908c22eeb081dbb385564f72e35a35a
|
|
BLAKE2b-256 checksum How to use checksums |
c9ef2c3b09d794b65392996d9e40284cb6ea6f858dd0dfedf6558e40da01e816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for whoisjson 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.