Skip to main content

irwho — WHOIS toolkit for .ir domains

Check .ir domain availability, scan hundreds in bulk, and invent brandable names from a few seed words.

PyPI Python CI License Dependencies


Why irwho?

Most .ir availability tools are either a one-off script or a slow single-domain lookup. irwho is a proper library: you bring a few words, it explores the rest.

  • 🧠 Names from seeds — give it ["web", "saz"] and it generates suffixes, prefixes, combos and plausible misspellings, then ranks them by brandability.
  • ⚡ Bulk + threaded — scans run on a thread pool with input order preserved.
  • 🔄 Resumable — interrupted scans pick up exactly where they left off (JSON cache).
  • 🕸 Polite — one shared rate limiter across all threads, retries with backoff, and automatic detection of throttled WHOIS servers.
  • ✅ Cross-checked — a WHOIS "available" verdict that still resolves in DNS is flipped to taken, so you don't buy a name that isn't free.
  • 🔌 Zero dependencies — pure standard library. Python 3.9+.
  • ⏳ Async ready — await checker.check_many_async(...) when you need it.

WHOIS is never a guarantee. Before paying, always confirm on nic.ir.

Install

pip install irwho

60-second tour

Check one domain

import irwho

r = irwho.check("websaz")            # ".ir" is appended for you
if r:
    print("probably free:", r.domain)
elif r.taken:
    print("registered since:", r.info.created)

Give it a few names — it explores the rest

import irwho

results = irwho.check_names(
    ["web", "site", "saz", "besaz", "vitrin"],
    limit=100,        # check only the 100 *best* candidates
    delay=0.5,        # stay polite
    workers=4,
)

print("\n".join(r.domain for r in results if r.available))

Invent names without touching the network

import irwho

names = irwho.generate(["web", "saz", "kar"], limit=10)
print(names)                    # best-looking first
irwho.to_domains(names)         # -> ['karweb.ir', 'sazweb.ir', ...]

Resumable bulk scan

import irwho

checker = irwho.Checker(cache=".irwho-cache.json")   # already-checked names are skipped
results = checker.check_many(candidates)

for r in results:
    print(f"{r.domain:<20} {r.status}")

Async

import asyncio, irwho

async def free_domains():
    checker = irwho.Checker(workers=6)
    results = await checker.check_many_async(["a.ir", "b.ir", "c.ir"])
    return [r.domain for r in results if r.available]

print(asyncio.run(free_domains()))

CLI

irwho web,site,saz,besaz --limit 100        # generate + check the best 100
irwho web,saz --list-only                   # just show candidates, no network
irwho --check webo.ir besazoo.ir            # check exact domains
irwho --words seeds.txt --available-only -o free.csv --format csv
$ irwho besazinoo,hamkar --limit 4 --delay 0.7
hamkari.ir      taken       0.20s
hamkaro.ir      taken       0.92s
hamkarha.ir     taken       1.43s
hamkarka.ir     available   1.33s

4 checked - 1 probably free
Flag Meaning
--limit N how many candidates to check (default 100)
--delay S minimum seconds between WHOIS queries (default 0.5)
--workers N parallel threads (default 4)
--retries N retries per domain, with backoff (default 2)
--tld ir TLD appended to bare names
--server HOST any WHOIS server
--no-dns skip the DNS cross-check
--no-cache ignore the resume cache
--available-only print only probably-free domains
--format table|csv|json output format
-o FILE write to a file (UTF-8 with BOM, opens cleanly in Excel)

API reference

Object Purpose
irwho.check(name, **opts) check one name → Result
irwho.check_many(domains, **opts) check many → list[Result] (order preserved)
irwho.check_names(seeds, ...) generate + check in one call
irwho.generate(seeds, ...) ranked candidates from seed words
irwho.to_domains(names, tld) attach a TLD
irwho.Checker(...) reusable checker: cache, thread pool, DNS check
irwho.WhoisClient(...) raw WHOIS transport with retries/backoff
irwho.Cache thread-safe JSON cache for resuming scans
irwho.Status AVAILABLE / TAKEN / UNKNOWN / ERROR
irwho.Result domain, status, info, latency, attempts, error

Result.info (irwho.Info) exposes registrar, registrant, created, expires, updated, nameservers and statuses.

Result is truthy when the domain is available:

if irwho.check("webo"):
    ...

How a verdict is made

  1. The WHOIS response is fetched with retries, backoff and a rate limiter.
  2. Strong "registered" evidence always wins — domain name:, registrant:, nserver:, registrar:, creation date: …
  3. Otherwise availability wording (no entries found, no match, …) → probably available.
  4. If WHOIS says free but DNS still resolves the name → taken (result.dns_confirms_taken is True).
  5. Everything else stays unknown; network failures are error — and errors are never cached, so a re-run always retries them.

Publishing a new version

git tag v0.2.0
git push origin v0.2.0

That's it — the GitHub Action builds and publishes to PyPI via Trusted Publishing. No tokens, no passwords.

Development

git clone https://github.com/mrhamidrezam/irwho.git
cd irwho
pip install -e ".[dev]"
pytest

License

MIT — see LICENSE.

Metadata

Release files for irwho 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for irwho 0.1.1
File Size Uploaded Provenance Actions
irwho-0.1.1.tar.gz 19.2 kB With provenance Details for irwho-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for irwho 0.1.1
File Interpreter ABI Platform Actions
irwho-0.1.1-py3-none-any.whl Python 3 none any Details for irwho-0.1.1-py3-none-any.whl

Total release size: 38.0 kB

Release files / irwho-0.1.1.tar.gz

Download URL irwho-0.1.1.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
550b3f4719b5ff7729b785537039f566b8351b79fc1648e2b0fda3cd2e60c875
BLAKE2b-256 checksum
How to use checksums
f79337484ffe84e2779fa9d9c6470bdd6050e2c09eeec2fa2af6180c816d239a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / irwho-0.1.1-py3-none-any.whl

Download URL irwho-0.1.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3185a98df50380655397b641b9a0552ff01ac97895c70a474f91389602450692
BLAKE2b-256 checksum
How to use checksums
6cc42a6f85515e72d2fa7e293344580db9213ddf70b800b9b3250a5587f09b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for irwho 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for irwho-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page