Skip to main content

Python bindings for the vacant Rust engine — domain availability via authoritative DNS.

Project description

vacant — domain availability via authoritative DNS

PyPI crates.io

Python bindings for the vacant Rust engine. Asks the authoritative TLD nameservers directly instead of WHOIS — fast, no rate limits, no waiting.

The wheel ships the same Rust engine compiled in, with a small Python facade and a vacant CLI entry point. Lockstep-versioned with the vacant crate: vacant 0.3.x (Python) wraps vacant 0.3.x (Rust) exactly.

Prefer a browser? vacant.alltuner.com is a hosted web UI built on vacant — a separate app that uses this package, not something it installs.

Install

Pick the path that matches how you'll use it:

CLI

brew install alltuner/tap/vacant   # macOS, Linux — native Rust binary
cargo install vacant               # any platform with a Rust toolchain
uvx vacant google.com              # one-shot, no install (Python wheel)

The brew / cargo paths give you the native Rust binary (instant startup, ideal for daily use). uvx runs the Python wheel — convenient when you don't want to install anything, slightly slower to start because it boots a Python interpreter.

MCP server

Expose vacant to AI agents over the Model Context Protocol (stdio). Needs the mcp extra:

uvx --from 'vacant[mcp]' vacant mcp

It registers one tool — check_domains(domains, verify=false) — returning a {domain, status} per input. Point any MCP client at it:

{ "mcpServers": { "vacant": { "command": "uvx", "args": ["--from", "vacant[mcp]", "vacant", "mcp"] } } }

Library

pip install vacant
# or with uv:
uv add vacant
from vacant import check_many, Status

results = check_many(["example.com", "anthropic.com", "totally-made-up-zxqv.cat"])
for r in results:
    print(r.domain, r.status.value, r.detail)

The on-disk SQLite cache is shared with the Rust CLI — runs against the same ~/.cache/vacant/results.db, so the brew binary and a Python script see each other's results.

from vacant import DiskCache, check_many

cache = DiskCache()  # default ~/.cache/vacant/results.db
results = check_many(["example.com"], cache=cache)

How it works

vacant.check_many calls into the Rust engine via PyO3 (vacant._core). The engine:

  1. Normalizes the input.
  2. Looks up cache; returns hits immediately.
  3. Runs a per-zone precheck (length, charset, reserved labels) from the bundled rules.toml.
  4. For inputs that pass, asks the parent zone's NS directly. Delegation → registered; NXDOMAIN/NODATA → unconfirmed (not delegated, not verified). Pass verify=True to confirm unconfirmed names against the registry's RDAP endpoint, promoting them to available (404) or registered (200, e.g. a held domain). available only ever means RDAP-confirmed.

available is not a registrability guarantee, though: new gTLD registries (especially community/city zones like .barcelona, .cat, .amsterdam, .berlin) keep reservation and premium lists invisible to DNS, WHOIS, and RDAP, so a name can read available yet still be refused at checkout (e.g. radio.barcelona). Tracked for an in-engine fix in #26.

Cache shape, rules format, and verdict semantics are all the engine's — see alltuner/vacant for the source of truth.

Develop

The Python package lives in the alltuner/vacant monorepo alongside the Rust engine, so dev commands run from the repo root:

just                 # menu
just py-develop      # build the maturin extension into the local venv
just py-check        # ruff + pytest
just py-wheel        # build a release wheel locally

License

MIT — see ../LICENSE.

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

vacant-0.4.8.tar.gz (123.2 kB view details)

Uploaded Source

Built Distributions

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

vacant-0.4.8-cp311-abi3-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

vacant-0.4.8-cp311-abi3-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

vacant-0.4.8-cp311-abi3-macosx_11_0_arm64.whl (4.6 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

vacant-0.4.8-cp311-abi3-macosx_10_12_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file vacant-0.4.8.tar.gz.

File metadata

  • Download URL: vacant-0.4.8.tar.gz
  • Upload date:
  • Size: 123.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vacant-0.4.8.tar.gz
Algorithm Hash digest
SHA256 1ea80a2245719d1c0de5228aa1d3b24d7e0e859da56eac0339d3c3b10d51bea9
MD5 92fa2849970d26ce7814bcbcb34ce65e
BLAKE2b-256 6a616bf47f76b893accbb149b19a920f892c799e0d95103182c5268d43c5be4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.8.tar.gz:

Publisher: release.yml on alltuner/vacant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vacant-0.4.8-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vacant-0.4.8-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a132b74ef4409a0fa847ee8ecc402363e17b9d4b2bb6809ce31e1fed4be0d18
MD5 5161fe7ee208fdf3581dd993deeee8b9
BLAKE2b-256 3b55f5ff15b9785dbf68955516c2336c6a2c187dd4f00323eec30f4404453b02

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.8-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on alltuner/vacant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vacant-0.4.8-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vacant-0.4.8-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 73eb1ea49833aa2fbee217c5b23599fb998878638ca2ad8c2c263f28c4d4656d
MD5 2615953ced2d9f42bdb82244286f20c8
BLAKE2b-256 bdf1088520d7247973f80b5d4352ffc9b1cedb995d81f7dc61eed2770be22a93

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.8-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on alltuner/vacant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vacant-0.4.8-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vacant-0.4.8-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 836a319d0ff56ea6902da8da5cc6b68eee32a09b49e1225c199195a663ac054f
MD5 68f29fe60a1f62d7050f6255ded2f9a2
BLAKE2b-256 63782dd2caab18bc09486170e482b4827a1504c34237d77650b4c89804568173

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.8-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on alltuner/vacant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vacant-0.4.8-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vacant-0.4.8-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e56e133f5d285d75fc743097eb8ff5cd0ae6eb82101ec6a39ddb694e818a729b
MD5 8bf8fb8fe99635e1a84c40d66e49f083
BLAKE2b-256 5ea7362e11f2e111b55cc4eb32ad881a81002532b1d0e308d265e96e430c41e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.8-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on alltuner/vacant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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