Skip to main content

use your DualSense (PS5) controller with python

Project description

pydualsense

control your dualsense through python. using the hid library this module implements the sending report for controlling you new PS5 controller. It creates a background thread to constantly receive and update the controller.

install

Just install the package from pypi

pip install pydualsense

usage

from pydualsense import pydualsense

ds = pydualsense() # open controller
ds.setColor(255,0,0) # set touchpad color to red
ds.setLeftTriggerMode(TriggerModes.Rigid)
ds.setLeftTriggerForce(1, 255)
ds.close() # closing the controller

See examples folder for some more ideas

Help wanted

Help wanted from people that want to use this and have feature requests. Just open a issue with the correct label.

dependecies

  • hid >= 1.0.4

Credits

Most stuff for this implementation were provided by and used from:

Coming soon

  • reading the states of the controller to enable a fully compatibility with python - partially done
  • add documentation using sphinx

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

pydualsense-0.3.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

pydualsense-0.3.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pydualsense-0.3.0.tar.gz.

File metadata

  • Download URL: pydualsense-0.3.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pydualsense-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2d847ef9dab6a65e9bdeb3f601199219f7da83b84ab5ed0cec528bf72f1ddc87
MD5 d597945bb6e4d1f5df28b092c2b0376b
BLAKE2b-256 a0db0016e29e0ce3ab9dc2621c7cb395bab8c13e126d562e79f8d8713ba9e650

See more details on using hashes here.

Provenance

File details

Details for the file pydualsense-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pydualsense-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pydualsense-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c26f4edeea4169651e926bec2c268a97e37aac5df2ac7ab2e9839430a81e3114
MD5 a9658f169a1d2140504ae823503cea50
BLAKE2b-256 e9f0219308ad6a9228f8369abfa773778c516e2ad30e2a5c91fd4a8683599a0b

See more details on using hashes here.

Provenance

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