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 hashes)