Pulse Security - Python SDK
Project description
Pulse Security - Python SDK
Installation
$ pip install pulsesec
Example
from pulse import Pulse, TokenNotFoundError, TokenUsedError, TokenExpiredError
import os
async def main():
client = Pulse(os.getenv("PULSE_SITE_KEY"), os.getenv("PULSE_SECRET_KEY"))
async def classify(token: str) -> bool:
try:
is_bot = await client.classify(token)
return is_bot
except TokenNotFoundError:
raise "Token not found"
except TokenUsedError:
raise "Token already used"
except TokenExpiredError:
raise "Token expired"
except Exception as e:
raise e
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
pulsesec-0.0.5.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file pulsesec-0.0.5.tar.gz
.
File metadata
- Download URL: pulsesec-0.0.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb5a7d8ab74749f1db300f682859e460a7273fb46f4ff207942b34f70e5f1dc |
|
MD5 | d181b90f377bb2b6251decb55f40ffb8 |
|
BLAKE2b-256 | 4dcd52dd91905ba9d2a5c75cf791cd77626dee3c6541924b958cfd5961f994c6 |
File details
Details for the file pulsesec-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pulsesec-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084c2c474a59779cca46425f91c05815aff0515c7f4bb759ee968d7c599a1f93 |
|
MD5 | bc0f82258b9c117f9bea2966377f5ec6 |
|
BLAKE2b-256 | 85b9f3353f52c606cd59b73b63024a45cd229bc293e93a4097ab5ee53a1ee9f5 |