No project description provided
Project description
NameHash Label Inspector
The Label Inspector is a critical component of the NameHash software stack that is used to protect users from malicious domain names.
- ENS-tailored domain name label inspection
- Character and grapheme information, scripts, codepoints, ...
- Confusable grapheme detection
- Rendering checks for different fonts
- ENSIP-15 verification with detailed explanations and auto-suggestions
- Punycode and DNS hostname compatibility checks
- Supports many use cases
- Standalone Python library (PyPI)
- ASGI web server
- Amazon AWS Lambda handler
Getting Started
Installing the library
The Label Inspector is available as a Python library on PyPI. You can install it with pip
:
pip install ens-label-inspector
Starting the web server
A FastAPI application is included in the label_inspector.web_api
module. The default installation from PyPI does not include an ASGI server, so you will need to install one separately. For example, to install uvicorn:
pip install 'uvicorn[standard]'
You can start the web server with:
uvicorn label_inspector.web_api:app
Make an example request:
curl -d '{"label":"nick"}' -H "Content-Type: application/json" -X POST http://localhos
t:8000
# {"label":"nick","status":"normalized", ...
Using the AWS Lambda handler
The Label Inspector includes a handler for Amazon AWS Lambda. It is available in the label_inspector.lambda
module. You can use it to create a Lambda function that will respond to HTTP requests. It uses the mangum library.
See the included Dockerfile for an example of how to build a Lambda deployment package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ens_label_inspector-0.2.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | be1fb0a6537f27693aeb25fae6eed7fc0d71bd05153ff0698ed9c66d702311c4 |
|
MD5 | 723d407f8d73aa701fedab53ee53f502 |
|
BLAKE2b-256 | dffd33150041cd4750c5655e75f31264f81ad34207ca9289a16d0efd1ac29097 |
Hashes for ens_label_inspector-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 796ebdb15ca27c0ecff0178cdcbccebbee777a93b95d897c834396c7c312bd77 |
|
MD5 | df8cf932b2c4c2c4b88171054f98d3c2 |
|
BLAKE2b-256 | 42de49bd05e639202f5d5dadf8cfebe7abfb5dea05fb090e8ed434aa89819197 |