Skip to content

UWUplus/pishockpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Comfortably use the PiShock API in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages