A modern, lightweight Python library and CLI for WHOIS domain lookups.
Project description
Dominfo
Dominfo is a modern, lightweight Python library and CLI tool for performing WHOIS domain lookups. It provides a simple interface to query IANA servers and retrieve domain registration details, with support for pretty-printed terminal output or raw JSON data.
⚡ Features
- Dual Mode: Use it as a command-line tool or import it as a Python library.
- Rich Output: Beautifully formatted terminal output using the Rich library.
- JSON Support: Easily export WHOIS data to JSON for programmatic processing.
- Customizable: Support for custom IANA servers.
📦 Installation
You can install Dominfo via pip:
pip install dominfo
🚀 Usage
1. As a CLI Tool
You can run dominfo directly from your terminal to get information about a domain.
Basic Lookup: Get a pretty-printed overview of the domain.
python -m dominfo google.com
JSON Output:
Get the output in machine-readable JSON format (useful for piping into jq or other tools).
python -m dominfo google.com --json
# or
dominfo google.com -j
Custom IANA Server: Specify a specific WHOIS server if needed.
python -m dominfo google.com --iana-server whois.nic.ai
2. As a Python Library
You can easily integrate Dominfo into your own Python scripts.
from dominfo.client import DominfoClient
# Initialize the client
client = DominfoClient()
# Fetch WHOIS information
whois_info = client.get_whois_info("google.com")
# Print the result (returns a dictionary/object)
print(whois_info)
Using a custom server in Python:
client = DominfoClient(server="whois.verisign-grs.com")
info = client.get_whois_info("google.com")
📝 Dependencies
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
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 dominfo-1.0.3.tar.gz.
File metadata
- Download URL: dominfo-1.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.9.25 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7750d3badfb4fa1fb765e9d47c77d057d691fe95f6ba233fbac595037cc98050
|
|
| MD5 |
5bae61b1e0616c209cbda655b773e0f1
|
|
| BLAKE2b-256 |
903c1662e010c58b2e0426f89f2339c5ce1da0c2670665a505dd4f69e87bae42
|
File details
Details for the file dominfo-1.0.3-py3-none-any.whl.
File metadata
- Download URL: dominfo-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.9.25 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f099f8bf25747c64de88102f62451e6b571701a7a2a905f4cfd558a56412a539
|
|
| MD5 |
e752af73f052c4827b1332b853154d56
|
|
| BLAKE2b-256 |
8f929200ca73ed4dbcae407a68bc64e08437676c2cc2bd3ea6b56d06229b1ec1
|