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.

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.

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.

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.5.tar.gz (118.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.5-cp311-abi3-manylinux_2_28_x86_64.whl (5.1 MB view details)

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

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

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

vacant-0.4.5-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.5.tar.gz.

File metadata

  • Download URL: vacant-0.4.5.tar.gz
  • Upload date:
  • Size: 118.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.5.tar.gz
Algorithm Hash digest
SHA256 2b3dc8f4963e784298e4f333c6383d45797979ba482904d8fe7d3763de3590f1
MD5 4fd49ac9dc095343b51d3f2932c37d3b
BLAKE2b-256 8d56ea38d973b62fc53a1b460cdfbe55623b819ca5026263689099186df0441e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.5.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.5-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vacant-0.4.5-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53c89241b8eb40d0b5983f667e4954f1ee118baa7b72d7b937fa135ab8d6513f
MD5 9a63868186e3a8daf5f8bbf83d7c9042
BLAKE2b-256 27f8c8c9555bdd67f93e4a379cf7c2fd532b4ec855fae715b33c2fdb2d41e921

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.5-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.5-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vacant-0.4.5-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ed190fcd89bd68d92e5668e8e471b708b26f22cd9aba89d45a1301b59af11dbb
MD5 435cde9712ecbafdee46614b3748e324
BLAKE2b-256 346c1bf57e6f8c8f4af0bbe609b15b8f85057e40cdbc404f89020f81cfb0718d

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.5-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.5-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vacant-0.4.5-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cccc32b65cac95e222a1a33e279f00d928c0a27518f8f5dff9bb12b07af99a9d
MD5 228849d085812d48e666265273b82b4b
BLAKE2b-256 6970e12a825fc91a0248a993a406dfd245d379a9709607d25f8b84fa76a86405

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.5-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.5-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vacant-0.4.5-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 eff5a309ba96534be78844a9200781e903d625e16921a3d9d50ba9b023e33a56
MD5 d62f6eda6081a837afd986d5c5665433
BLAKE2b-256 5a75f5d67771235e0e5c7580a6ae7f8896ede78c50d43e414459cff7486627c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vacant-0.4.5-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