Python installation

This guide covers the installation and usage of package in Python.

Package

Get the latest version from How2Validate Python Package Registry

Using pip

pip install how2validate

Usage

How2Validate can be used both programmatically and via the command-line interface (CLI). Below are detailed instructions for Python usage.

Validate a secret

how2validate --provider NPM --service "NPM Access Token" --secret "<<SECRET_HERE>>"
-- OR --
how2validate -p NPM -s "NPM Access Token" -sec "<<SECRET_HERE>>"

Validate with response status

how2validate --provider NPM --service "NPM Access Token" --secret "<<SECRET_HERE>>" --response
-- OR --
how2validate -p NPM -s "NPM Access Token" -sec "<<SECRET_HERE>>" -r

Importing and Using the Validate Function

from how2validate import validate
 
# Validate secrets programmatically
validation_result = validate(
    provider="NPM",
    service="NPM Access Token",
    secret="<<SECRET_HERE>>",
    response=False,
    report="useremail@domain.com"
)
print(validation_result)