Skip to main content

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

(Note: Ensure you have a pyproject.toml or setup.py configured to expose the console script. If not, you can run it via python -m 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 bot.ai

JSON Output: Get the output in machine-readable JSON format (useful for piping into jq or other tools).

python -m dominfo bot.ai --json
# or
dominfo bot.ai -j

Custom IANA Server: Specify a specific WHOIS server if needed.

python -m dominfo bot.ai --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("bot.ai")

# 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

  • Typer: For the Command Line Interface.
  • Rich: For beautiful terminal formatting.

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

dominfo-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dominfo-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file dominfo-1.0.0.tar.gz.

File metadata

  • Download URL: dominfo-1.0.0.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

Hashes for dominfo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cb5e0c566a88416bb529d6bcc3cc6d27beee984ce333f9bb9e99da1bae26f2ad
MD5 a8bef3cb94f8f5c3ee5e2ee8c40125ee
BLAKE2b-256 1181f22b795cef3b7f2ef860f4b45d1630a1fab467c581b41b1307aa9b40a88c

See more details on using hashes here.

File details

Details for the file dominfo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dominfo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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

Hashes for dominfo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65554f3d726925c48f97d10602512e563deea4095ccaf784ca14632bacfd704b
MD5 a1fdd2ea2fcc65ed3e4b815ce789c308
BLAKE2b-256 fc8edbf3b813e41bc3b84ba77b9d903071658c8785fe66dd0d930a6bd4cce05d

See more details on using hashes here.

Supported by

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