Prompt API - Whois API - Python Package
pa-whois is a python wrapper for whois api
Requirements
- You need to signup for Prompt API
- You need to subscribe whois api, test drive is free!!!
- You need to set
PROMPTAPI_TOKENenvironment variable after subscription.
then;
$ pip install pa-whois
Example Usage
Let’s try with check endpoint:
from whois import Whois
who = Whois()
who.check('promptapi.com')
# returns dict
# {'result': 'registered', 'status': 200}
# or
check_result = who.check('promptapi.com')
print(check_result)
# {'result': 'registered', 'status': 200}
who.check('promptapi.comaaaaaaaaaaaaaaaa')
# {'error': 'TLD not supported', 'status': 400}
who.check('promptapi-testing-domain.com')
# {'result': 'available', 'status': 200}
Now, let’s try with query endpoint:
from whois import Whois
who = Whois()
who.query('promptapi-testing-domain.com')
# {'error': 'No match for promptapi-testing-domain.com', 'status': 404}
who.query('promptapi.com')
#{'result': {'domain_name': 'PROMPTAPI.COM',
# 'registrar': 'NameCheap, Inc.',
# 'whois_server': 'whois.namecheap.com',
# 'referral_url': None,
# 'updated_date': '2020-05-27 22:19:36',
# 'creation_date': '2020-04-19 15:11:52',
# 'expiration_date': '2021-04-19 15:11:52',
# 'name_servers': ['APOLLO.NS.CLOUDFLARE.COM', 'MARJORY.NS.CLOUDFLARE.COM'],
# 'status': 'clientTransferProhibited https://icann.org/epp#clientTransferProhibited',
# 'emails': 'abuse@namecheap.com',
# 'dnssec': 'unsigned',
# 'name': None,
# 'org': None,
# 'address': None,
# 'city': None,
# 'state': None,
# 'zipcode': None,
# 'country': None},
# 'status': 200}
License
This project is licensed under MIT
Contributer(s)
- Prompt API - Creator, maintainer
Contribute
All PR’s are welcome!
fork(https://github.com/promptapi/whois-py/fork)- Create your
branch(git checkout -b my-feature) commityours (git commit -am 'Add awesome features...')pushyourbranch(git push origin my-feature)- Than create a new Pull Request!
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Metadata
Release files for pa-whois 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pa-whois-0.1.0.tar.gz | 4.0 kB | Without provenance | Details for pa-whois-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pa_whois-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pa_whois-0.1.0-py3-none-any.whl |
Total release size: 8.6 kB
Release files / pa-whois-0.1.0.tar.gz
| Download URL | pa-whois-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3a430ee26fe25286991e5e40a948516768d76e0ea8ce31333f76b22455208c8
|
|
BLAKE2b-256 checksum How to use checksums |
be2cdc9431a1c987eaa9479c344c85f5b4aeb09479e0ed85816693691126a068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Release files / pa_whois-0.1.0-py3-none-any.whl
| Download URL | pa_whois-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999ef0a12144947636f1e85a4a6b40a62c47121ba7d9998894eb381410b1f979
|
|
BLAKE2b-256 checksum How to use checksums |
8deccdaedd3ff5ccc955ab5b30f057d8044a164d5c496f5a4246ff6715a9523f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Security for pa-whois 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.