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.
License
Licensed under the MIT License, Copyright © 2023-present NameHash Labs.
See LICENSE for more information.
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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7134f1142bc5fbd28eeec0700b0ac7ccf3261c0e526edffe4daebc61c64b5c |
|
MD5 | 8550c1fe3bf2961b2a69126d4efb6d80 |
|
BLAKE2b-256 | 107df6571d10c9c88772c866520a2bea3b883fa06ab1975b20f5f31f5a81dbb0 |
Hashes for ens_label_inspector-0.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49359e1e87bbf3b651a87e8defe32f02652faf9412428c775c3f800bda227e5c |
|
MD5 | 99c70f6140a3672fa050e30f4a2364b4 |
|
BLAKE2b-256 | c0f71c20f0caa16f1a459d134774b312edf75e3324d53be71c8cf5f43c331602 |