# pishockpy
Comfortably use the [PiShock](https://PiShock.com) API in Python.
This requires at least `Python 3`
## Usage
Import the package:
```python
from pishockpy import PishockAPI
```
Declare a new shocker instance:
```python
pishock = PishockAPI("YOUR_API_KEY", "YOUR_USERNAME", "SHARECODE", "YOUR_APP_NAME")
```
Run actions on a shocker:
```python
# Send a shock - intensity (float between 0 and 1) and duration in seconds (integer between 1 and 15)
pishock.shock(INTENSITY, DURATION)
# Send a mini shock - intensity (float between 0 and 1)
pishock.minishock(INTENSITY)
# Send a vibration - intensity (float between 0 and 1) and duration in seconds (integer between 1 and 15)
pishock.vibrate(INTENSITY, DURATION)
# Send a sound - duration in seconds
pishock.beep(DURATION)
```
Check if an action was successful:
```python
if(pishock.shock(INTENSITY, DURATION)):
print("Shock was successful")
else:
print("Shock was not successful")
```
### Disclaimer
I'm not affiliated with PiShock in any way. I am also not responsible for any damage caused by this library.
Raw data
{
"_id": null,
"home_page": "https://github.com/UWUplus/pishockpy",
"name": "pishockpy",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "pishock",
"author": "Ralf Rademacher",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/c2/a0/879a4eca77f831dee0203d69bbf38908c7be2b157767a5731862b7526bf7/pishockpy-0.0.4.tar.gz",
"platform": null,
"description": "# pishockpy\n\nComfortably use the [PiShock](https://PiShock.com) API in Python. \nThis requires at least `Python 3`\n\n## Usage\nImport the package:\n```python\nfrom pishockpy import PishockAPI\n```\nDeclare a new shocker instance:\n```python\npishock = PishockAPI(\"YOUR_API_KEY\", \"YOUR_USERNAME\", \"SHARECODE\", \"YOUR_APP_NAME\")\n```\nRun actions on a shocker:\n```python\n# Send a shock - intensity (float between 0 and 1) and duration in seconds (integer between 1 and 15)\npishock.shock(INTENSITY, DURATION)\n\n# Send a mini shock - intensity (float between 0 and 1)\npishock.minishock(INTENSITY)\n\n# Send a vibration - intensity (float between 0 and 1) and duration in seconds (integer between 1 and 15)\npishock.vibrate(INTENSITY, DURATION)\n\n# Send a sound - duration in seconds\npishock.beep(DURATION)\n\n```\n\nCheck if an action was successful:\n```python\nif(pishock.shock(INTENSITY, DURATION)):\n print(\"Shock was successful\")\nelse:\n print(\"Shock was not successful\")\n```\n\n### Disclaimer\nI'm not affiliated with PiShock in any way. I am also not responsible for any damage caused by this library.\n",
"bugtrack_url": null,
"license": "",
"summary": "Control a PiShock via the API.",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://github.com/UWUplus/pishockpy"
},
"split_keywords": [
"pishock"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e1084a45b332200c170810d5e1b2887f5c67180e37155a9266de0c85830c02c9",
"md5": "efc2a12ae7d35518c15ab790e066d6bb",
"sha256": "fc24ed304fc541e52ae39cd03537531537d7a4e454dab4374e5cbf097e594ab3"
},
"downloads": -1,
"filename": "pishockpy-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "efc2a12ae7d35518c15ab790e066d6bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15427,
"upload_time": "2023-06-08T06:05:39",
"upload_time_iso_8601": "2023-06-08T06:05:39.200550Z",
"url": "https://files.pythonhosted.org/packages/e1/08/4a45b332200c170810d5e1b2887f5c67180e37155a9266de0c85830c02c9/pishockpy-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c2a0879a4eca77f831dee0203d69bbf38908c7be2b157767a5731862b7526bf7",
"md5": "61377d9187d72b6ffcb0fe1c16a1d741",
"sha256": "09a59a5ce10a83a701ded523bf3a55e9f1c5130efa308326beb18f6677f60072"
},
"downloads": -1,
"filename": "pishockpy-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "61377d9187d72b6ffcb0fe1c16a1d741",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15218,
"upload_time": "2023-06-08T06:05:41",
"upload_time_iso_8601": "2023-06-08T06:05:41.377856Z",
"url": "https://files.pythonhosted.org/packages/c2/a0/879a4eca77f831dee0203d69bbf38908c7be2b157767a5731862b7526bf7/pishockpy-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-08 06:05:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "UWUplus",
"github_project": "pishockpy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pishockpy"
}