Avaiability
| Platform | Status |
|---|---|
| MacOS | Supported ✅ |
| Linux | In Progress 🚧 |
| Windows | Not supported yet ❌ |
Installation
To install the package, just run the following command:
pip install whotfis-py
Usage
import whotfis_py
result = whotfis_py.lookup("QUERY", registry)
The package has different classes for different registers on which will the whois lookup be performed, so when executing the query is possible to specify the database MACRO
import whotfis_py
from whotfis_py import registries
whotfis_py.lookup("QUERY", registries.RADB)
From the available registers the program supports:
- ARPIN
- APNIC
- ABUSE
- AFRINIC
- USMILITARY
- INTERNIC
- IANA
- KRNIC
- LACNIC
- RIPE
- RADB
If you want to specify a custom register you also need to provide the server name for that register
whotfis_py.lookup("QUERY", registries.CUSTOM, "whois.radb.net")
Results
The lookup() function will return a class depending on the registry you passed, all the classes are specified in the file whois_py/result.py, if you want to list all the possible values at runtime you can use the dir()method on the object
result = whotfis_py.lookup("QUERY", registries.RADB)
attributes = dir(result)
All the classes inherit from the whois_result super class, which provide the dict() method to convert all the instances of the class to dictionary
result = whotfis_py.lookup("QUERY", registries.RADB)
print(result.dict())
Since the CUSTOM registry output is unknown the parameters will be setted at runtime during the lookup, the accepted parameters are only in the key:value shape.
In case of duplicate keys in the output there are two policies, a list of appendable keys is provided for each class in the whois_result class, if the key is not in the list the value will be overwritten, otherwise the value will be appended to the others.
Metadata
Release files for whotfis-py 0.0.7
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 |
|---|---|---|---|---|
| whotfis_py-0.0.7.tar.gz | 8.8 kB | Without provenance | Details for whotfis_py-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whotfis_py-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for whotfis_py-0.0.7-py3-none-any.whl |
Total release size: 18.4 kB
Release files / whotfis_py-0.0.7.tar.gz
| Download URL | whotfis_py-0.0.7.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd300eec64012761fb2dbdda0545127ae35926c525c7fa56a398aa096d740421
|
|
BLAKE2b-256 checksum How to use checksums |
edda52841290cbf65849997d1784fcf2ed2d854b2e74f18fa44c69025a00c0a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / whotfis_py-0.0.7-py3-none-any.whl
| Download URL | whotfis_py-0.0.7-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59b24e12a60cae3578656ec8af0b57b3ea6d6e3f234b517c4cd188a8c0b22c93
|
|
BLAKE2b-256 checksum How to use checksums |
3a337bfbf06845db6f4997ef7170e1ce19859b864de43262480c7af0ca20e744
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for whotfis-py 0.0.7
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.