# Pulse Security - Python SDK
## Installation
```sh
$ pip install pulsesec
```
## Example
```py
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pulsesec",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Pulse Security <contact@pulsesecurity.org>",
"download_url": "https://files.pythonhosted.org/packages/4d/cd/52dd91905ba9d2a5c75cf791cd77626dee3c6541924b958cfd5961f994c6/pulsesec-0.0.5.tar.gz",
"platform": null,
"description": "# Pulse Security - Python SDK\n\n## Installation\n\n```sh\n$ pip install pulsesec\n```\n\n## Example\n\n```py\nfrom pulse import Pulse, TokenNotFoundError, TokenUsedError, TokenExpiredError\nimport os\n\n\nasync def main():\n client = Pulse(os.getenv(\"PULSE_SITE_KEY\"), os.getenv(\"PULSE_SECRET_KEY\"))\n\n async def classify(token: str) -> bool:\n try:\n is_bot = await client.classify(token)\n return is_bot\n except TokenNotFoundError:\n raise \"Token not found\"\n except TokenUsedError:\n raise \"Token already used\"\n except TokenExpiredError:\n raise \"Token expired\"\n except Exception as e:\n raise e\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Pulse Security - Python SDK",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/pulsesec/pulse-sdk-py",
"Issues": "https://github.com/pulsesec/pulse-sdk-py/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "85b9f3353f52c606cd59b73b63024a45cd229bc293e93a4097ab5ee53a1ee9f5",
"md5": "bc0f82258b9c117f9bea2966377f5ec6",
"sha256": "084c2c474a59779cca46425f91c05815aff0515c7f4bb759ee968d7c599a1f93"
},
"downloads": -1,
"filename": "pulsesec-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc0f82258b9c117f9bea2966377f5ec6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3736,
"upload_time": "2024-04-27T06:53:08",
"upload_time_iso_8601": "2024-04-27T06:53:08.823531Z",
"url": "https://files.pythonhosted.org/packages/85/b9/f3353f52c606cd59b73b63024a45cd229bc293e93a4097ab5ee53a1ee9f5/pulsesec-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4dcd52dd91905ba9d2a5c75cf791cd77626dee3c6541924b958cfd5961f994c6",
"md5": "d181b90f377bb2b6251decb55f40ffb8",
"sha256": "cfb5a7d8ab74749f1db300f682859e460a7273fb46f4ff207942b34f70e5f1dc"
},
"downloads": -1,
"filename": "pulsesec-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "d181b90f377bb2b6251decb55f40ffb8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3792,
"upload_time": "2024-04-27T06:53:10",
"upload_time_iso_8601": "2024-04-27T06:53:10.622565Z",
"url": "https://files.pythonhosted.org/packages/4d/cd/52dd91905ba9d2a5c75cf791cd77626dee3c6541924b958cfd5961f994c6/pulsesec-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-27 06:53:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pulsesec",
"github_project": "pulse-sdk-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": [
[
"==",
"3.9.3"
]
]
},
{
"name": "dataclass-wizard",
"specs": [
[
"==",
"0.22.3"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"8.1.2"
]
]
},
{
"name": "pytest-asyncio",
"specs": [
[
"==",
"0.23.6"
]
]
},
{
"name": "pytest-mock",
"specs": [
[
"==",
"3.14.0"
]
]
},
{
"name": "build",
"specs": [
[
"==",
"1.2.1"
]
]
}
],
"lcname": "pulsesec"
}