pishockpy
Comfortably use the PiShock API in Python.
This requires at least Python 3
Usage
Import the package:
from pishockpy import PishockAPI
Declare a new shocker instance:
pishock = PishockAPI("YOUR_API_KEY", "YOUR_USERNAME", "SHARECODE", "YOUR_APP_NAME")
Run actions on a shocker:
# 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:
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.
Metadata
Release files for pishockpy 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pishockpy-0.0.4.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pishockpy-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.6 kB
Release files / pishockpy-0.0.4.tar.gz
| Download URL | pishockpy-0.0.4.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09a59a5ce10a83a701ded523bf3a55e9f1c5130efa308326beb18f6677f60072
|
|
BLAKE2b-256 checksum How to use checksums |
c2a0879a4eca77f831dee0203d69bbf38908c7be2b157767a5731862b7526bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Release files / pishockpy-0.0.4-py3-none-any.whl
| Download URL | pishockpy-0.0.4-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc24ed304fc541e52ae39cd03537531537d7a4e454dab4374e5cbf097e594ab3
|
|
BLAKE2b-256 checksum How to use checksums |
e1084a45b332200c170810d5e1b2887f5c67180e37155a9266de0c85830c02c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|