Metadata-Version: 2.3
Name: dominfo
Version: 1.0.1
Summary: A modern, lightweight Python library and CLI for WHOIS domain lookups.
License: MIT
Keywords: whois,domain,iana,dns,cli,network
Author: M4RC0Sx
Author-email: contact@marcosalonso.dev
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: Utilities
Requires-Dist: rich (>=14.2.0,<15.0.0)
Requires-Dist: typer (>=0.19.2,<0.20.0)
Project-URL: Documentation, https://github.com/M4RC0Sx/dominfo/blob/main/README.md
Project-URL: Homepage, https://github.com/M4RC0Sx/dominfo
Project-URL: Issues, https://github.com/M4RC0Sx/dominfo/issues
Project-URL: Repository, https://github.com/M4RC0Sx/dominfo
Description-Content-Type: text/markdown

# 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](https://github.com/Textualize/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:

```bash
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.

```bash
python -m dominfo bot.ai
```

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

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

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

```bash
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.

```python
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:**

```python
client = DominfoClient(server="whois.verisign-grs.com")
info = client.get_whois_info("google.com")
```

-----

## 📝 Dependencies

  * [**Typer**](https://typer.tiangolo.com/): For the Command Line Interface.
  * [**Rich**](https://github.com/Textualize/rich): For beautiful terminal formatting.

-----
