Skip to main content

boundstone (Python)

Official Python client for Boundstone — phone, email & IP validation you can actually verify.

Zero dependencies (standard library only). Python 3.8+.

pip install boundstone

Quickstart

from boundstone import Boundstone

bs = Boundstone("bs_live_YOUR_KEY")   # create a key at https://app.boundstone.io

r = bs.verify_email("you@example.com")
print(r.valid_syntax, r.mx_found, r.disposable, r.role_account)

The honesty contract

Every result carries a checks object with two lists — what was checked, and what was not. That second list is the whole point: you always know exactly what a valid is based on, and Boundstone never implies a check it didn't run.

r = bs.verify_email("you@example.com")
print(r.checks.performed)      # ['syntax', 'mx', 'disposable_list', 'role_list']
print(r.checks.not_performed)  # ['smtp_mailbox', 'catch_all']

smtp_mailbox and catch_all sit in not_performed because confirming a specific mailbox exists needs an SMTP probe that many servers answer dishonestly. Boundstone tells you it didn't run that, rather than dressing up a guess as a verdict.

Phone

p = bs.verify_phone("+14155550184")
print(p.valid, p.country, p.line_type, p.e164)     # True US fixed_line_or_mobile +14155550184
print(p.checks.not_performed)                       # ['carrier_lookup', 'ported_status', 'hlr_liveness']

# For a national number without a country code, pass a default region:
bs.verify_phone("07911 123456", country="GB")

Carrier, ported-status and live-reachability (HLR) checks are not_performed today — metadata can't see the live network, and Boundstone won't pretend it can.

IP

ip = bs.verify_ip("10.0.0.1")
print(ip.valid, ip.version, ip.classification, ip.is_public, ip.is_bogon)
print(ip.checks.not_performed)   # ['geolocation', 'asn', 'hosting_datacenter', 'proxy_vpn_tor', 'reputation']

IP validation and classification (public / private / bogon…) is live and free. IP intelligence (geolocation, proxy/VPN) needs licensed data and is not_performed.

Account

acct = bs.account()
print(acct.plan, acct.balance)

Errors

Any non-2xx response raises BoundstoneError with the status and the API's error code:

from boundstone import Boundstone, BoundstoneError

try:
    bs.verify_email("you@example.com")
except BoundstoneError as e:
    print(e.status, e.code, e.message)   # e.g. 402 insufficient_credits ...

Notes

MIT licensed.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boundstone-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

boundstone-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file boundstone-0.1.0.tar.gz.

File metadata

  • Download URL: boundstone-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for boundstone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b36aac09f47dee63637f920dd681ae47e56841d485fcd5df879cb935e32c6954
MD5 826671222b531046e10c48428a3bf250
BLAKE2b-256 32e205e95a4205af0bef84c6cf54e8f7346ebaa72c74d854e491735180138849

See more details on using hashes here.

File details

Details for the file boundstone-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: boundstone-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for boundstone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a641af33a600679a471310dd2a519d1801876b571d906214ec8d5cf7692eced
MD5 7ccfeb9056b8b275ca6f5613423b49be
BLAKE2b-256 b1c2d20cf1488189051a95d213abf947b0556cb65de9a745ce84f932f273425c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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