Skip to main content

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:

  1. whois(domain): Get WHOIS information for a domain
  2. nslookup(domain): Get DNS records for a domain
  3. ssl_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whoisjson-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

whoisjson-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file whoisjson-0.1.0.tar.gz.

File metadata

  • Download URL: whoisjson-0.1.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

Hashes for whoisjson-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8f9a61361c79770a0c97b891d4933bd43eac3505fa1e47da8beee2d20f0f508c
MD5 8d05975f41085c37a73313b0e0bb944e
BLAKE2b-256 e1f0ec6b0f1e3f522bd09fa2bc41871025e52f33587983a0a3897093f9597bc0

See more details on using hashes here.

File details

Details for the file whoisjson-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whoisjson-0.1.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

Hashes for whoisjson-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a4d741faade8e10b2cc03fc3615fe64181e608a8ca851677a67120b95c62e3a
MD5 8ce9bd3e4f75c4889a78a47d98fd4dd8
BLAKE2b-256 5cb9c6642deac04b024eea5da3b4eda84f61390c3db3c44f0f30a46e673d6596

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page