Skip to main content

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


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)

Uploaded Source

Built Distribution

pulsesec-0.0.5-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for pulsesec-0.0.5.tar.gz
Algorithm Hash digest
SHA256 cfb5a7d8ab74749f1db300f682859e460a7273fb46f4ff207942b34f70e5f1dc
MD5 d181b90f377bb2b6251decb55f40ffb8
BLAKE2b-256 4dcd52dd91905ba9d2a5c75cf791cd77626dee3c6541924b958cfd5961f994c6

See more details on using hashes here.

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

Hashes for pulsesec-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 084c2c474a59779cca46425f91c05815aff0515c7f4bb759ee968d7c599a1f93
MD5 bc0f82258b9c117f9bea2966377f5ec6
BLAKE2b-256 85b9f3353f52c606cd59b73b63024a45cd229bc293e93a4097ab5ee53a1ee9f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page