# cython_xinput
[![PyPI - Version](https://img.shields.io/pypi/v/cython_xinput.svg)](https://pypi.org/project/cython_xinput)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cython_xinput.svg)](https://pypi.org/project/cython_xinput)
[![CI](https://github.com/zariiii9003/cython_xinput/actions/workflows/wheels.yml/badge.svg)](https://github.com/zariiii9003/cython_xinput/actions/workflows/wheels.yml)
## Installation
```console
pip install cython-xinput
```
## Example
```python3
from cython_xinput import XinputButtons, XinputGamepad
xg = XinputGamepad(0)
xg.configure_deadzone(
left_thumb=0.01,
right_thumb=0.01,
trigger=0.01,
)
xg.set_vibration(left=0.00, right=0.2)
while True:
if not xg.update():
continue
print(xg.left_thumbstick())
print(xg.right_trigger())
buttons = xg.buttons()
if XinputButtons.A in buttons:
print("A")
if XinputButtons.DPAD_UP in buttons:
print("DPAD_UP")
```
Raw data
{
"_id": null,
"home_page": null,
"name": "cython-xinput",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "Windows, Xbox, Gamepad, xinput",
"author": null,
"author_email": "Artur Drogunow <Artur.Drogunow@zf.com>",
"download_url": "https://files.pythonhosted.org/packages/23/be/fc9d6a56a60f89b9a39f4d70c5beb3a8a75aae4f323d606a380b12f90772/cython_xinput-0.1.0.tar.gz",
"platform": null,
"description": "# cython_xinput\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cython_xinput.svg)](https://pypi.org/project/cython_xinput)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cython_xinput.svg)](https://pypi.org/project/cython_xinput)\n[![CI](https://github.com/zariiii9003/cython_xinput/actions/workflows/wheels.yml/badge.svg)](https://github.com/zariiii9003/cython_xinput/actions/workflows/wheels.yml)\n\n## Installation\n\n```console\npip install cython-xinput\n```\n\n## Example\n\n```python3\nfrom cython_xinput import XinputButtons, XinputGamepad\n\nxg = XinputGamepad(0)\n\nxg.configure_deadzone(\n left_thumb=0.01,\n right_thumb=0.01,\n trigger=0.01,\n)\nxg.set_vibration(left=0.00, right=0.2)\n\nwhile True:\n if not xg.update():\n continue\n\n print(xg.left_thumbstick())\n print(xg.right_trigger())\n \n buttons = xg.buttons()\n if XinputButtons.A in buttons:\n print(\"A\")\n if XinputButtons.DPAD_UP in buttons:\n print(\"DPAD_UP\")\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/zariiii9003/cython_xinput",
"Issues": "https://github.com/zariiii9003/cython_xinput/issues",
"Source": "https://github.com/zariiii9003/cython_xinput"
},
"split_keywords": [
"windows",
" xbox",
" gamepad",
" xinput"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "111dbabf0fd46068251062e2a0a31dcfe121fd325d7d87cd0d332198761e5dc0",
"md5": "8a384d48ff6bbedcb6462c391eb2606c",
"sha256": "874624f5816ab423c0b6f3306b60c9e9c673f3ccd7c35fd23ce49952e5a62172"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp310-cp310-win32.whl",
"has_sig": false,
"md5_digest": "8a384d48ff6bbedcb6462c391eb2606c",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.7",
"size": 37394,
"upload_time": "2024-06-02T15:13:17",
"upload_time_iso_8601": "2024-06-02T15:13:17.038619Z",
"url": "https://files.pythonhosted.org/packages/11/1d/babf0fd46068251062e2a0a31dcfe121fd325d7d87cd0d332198761e5dc0/cython_xinput-0.1.0-cp310-cp310-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "54339b066a8117d236d73e487d3b8939219806f4a2200409a940b8b1558a2bab",
"md5": "826a16d22862196dfdc19262542a25ee",
"sha256": "ff639c7b8df9ab179bddb673d391675cfe3a2bfac61d9dcd767cf5f91d3a3b6b"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "826a16d22862196dfdc19262542a25ee",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.7",
"size": 42268,
"upload_time": "2024-06-02T15:13:18",
"upload_time_iso_8601": "2024-06-02T15:13:18.592751Z",
"url": "https://files.pythonhosted.org/packages/54/33/9b066a8117d236d73e487d3b8939219806f4a2200409a940b8b1558a2bab/cython_xinput-0.1.0-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "22be2fcf0a005f3b403d59afaa55f0bb8f1773f9a3e530c98abcf47c383699ce",
"md5": "ab890d1ea6051b2170eaed0111e16e86",
"sha256": "2236c3d62b754fd86eed071c3de7da6e256dbc903bd7415d873c488cd74a1926"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp311-cp311-win32.whl",
"has_sig": false,
"md5_digest": "ab890d1ea6051b2170eaed0111e16e86",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.7",
"size": 37443,
"upload_time": "2024-06-02T15:13:20",
"upload_time_iso_8601": "2024-06-02T15:13:20.044863Z",
"url": "https://files.pythonhosted.org/packages/22/be/2fcf0a005f3b403d59afaa55f0bb8f1773f9a3e530c98abcf47c383699ce/cython_xinput-0.1.0-cp311-cp311-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "10ec655937e34da8662dd4a82de96b8b91ee23b00f10423f3c3976a1fc069633",
"md5": "25ba5b93b17a546e70934599cc86c41d",
"sha256": "92b320eaafc12d768291957764479ee2594a443a870512e987449af300b1e19b"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "25ba5b93b17a546e70934599cc86c41d",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.7",
"size": 42402,
"upload_time": "2024-06-02T15:13:20",
"upload_time_iso_8601": "2024-06-02T15:13:20.885154Z",
"url": "https://files.pythonhosted.org/packages/10/ec/655937e34da8662dd4a82de96b8b91ee23b00f10423f3c3976a1fc069633/cython_xinput-0.1.0-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f3c800859ad7a391a0d261b06c7f333457d48eaba4313dffbde04d655d25dd8a",
"md5": "08c65de7562a5e779e61c995e9b97e09",
"sha256": "82aaef0c92960e36ba19be8c58a876768e0b5c50bb322f6929d204eba13367be"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp312-cp312-win32.whl",
"has_sig": false,
"md5_digest": "08c65de7562a5e779e61c995e9b97e09",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.7",
"size": 37567,
"upload_time": "2024-06-02T15:13:22",
"upload_time_iso_8601": "2024-06-02T15:13:22.302888Z",
"url": "https://files.pythonhosted.org/packages/f3/c8/00859ad7a391a0d261b06c7f333457d48eaba4313dffbde04d655d25dd8a/cython_xinput-0.1.0-cp312-cp312-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5d2ee85571e3c7530bf9003b83b2885ae9cf774f692655158bc32540f6fd1467",
"md5": "6355eeb1e5067d8374f777601748843c",
"sha256": "4cdf4061c29b7005a7f7b74e4e28ea0b208aca9a7285d0b6275e4d394a3466ef"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "6355eeb1e5067d8374f777601748843c",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.7",
"size": 42517,
"upload_time": "2024-06-02T15:13:23",
"upload_time_iso_8601": "2024-06-02T15:13:23.742143Z",
"url": "https://files.pythonhosted.org/packages/5d/2e/e85571e3c7530bf9003b83b2885ae9cf774f692655158bc32540f6fd1467/cython_xinput-0.1.0-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1068f37812a122d97358850e8a4ff8357663b5c79117ea38359558e318d1718f",
"md5": "622a41cdf3480fdfc13090b2bdf372ac",
"sha256": "e080b7d11009150e8792f51d85bcba2a1207e8e161b4d9627456a72ca685ba28"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp37-cp37m-win32.whl",
"has_sig": false,
"md5_digest": "622a41cdf3480fdfc13090b2bdf372ac",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 38509,
"upload_time": "2024-06-02T15:13:25",
"upload_time_iso_8601": "2024-06-02T15:13:25.312922Z",
"url": "https://files.pythonhosted.org/packages/10/68/f37812a122d97358850e8a4ff8357663b5c79117ea38359558e318d1718f/cython_xinput-0.1.0-cp37-cp37m-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "60b72f9b3fb38d219335b786d8111aee5649385eea03174ffb9e8729e08cc5a9",
"md5": "15edbb216c31d8b77ab3a5be916567c4",
"sha256": "da665f0596f13d9ca97cce6f48dd621791456dd34c838ffb02b4e3808a771fda"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp37-cp37m-win_amd64.whl",
"has_sig": false,
"md5_digest": "15edbb216c31d8b77ab3a5be916567c4",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 43981,
"upload_time": "2024-06-02T15:13:26",
"upload_time_iso_8601": "2024-06-02T15:13:26.802361Z",
"url": "https://files.pythonhosted.org/packages/60/b7/2f9b3fb38d219335b786d8111aee5649385eea03174ffb9e8729e08cc5a9/cython_xinput-0.1.0-cp37-cp37m-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ce18fd39b2b1d6021d5498fd26ff5db7b4a4ceafc19c236f6397692c5b38eb55",
"md5": "6b1072ba4a680e079bda2afbc5ba027b",
"sha256": "f2d9dc5c9257c3741ea34eeea51451acdf9da9c09a008919ccfe9178403e54fc"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp38-cp38-win32.whl",
"has_sig": false,
"md5_digest": "6b1072ba4a680e079bda2afbc5ba027b",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.7",
"size": 37993,
"upload_time": "2024-06-02T15:13:28",
"upload_time_iso_8601": "2024-06-02T15:13:28.293657Z",
"url": "https://files.pythonhosted.org/packages/ce/18/fd39b2b1d6021d5498fd26ff5db7b4a4ceafc19c236f6397692c5b38eb55/cython_xinput-0.1.0-cp38-cp38-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd5fb5369fa464139e32eb2a0d18fddb82f45709b595942effdd6b7da52650c8",
"md5": "cd17bff1899e356200c192030ffabb8b",
"sha256": "2200f0f52c89999af2817b9eed8a4ff0225baac6f37b6893b89dc1385f72e7c2"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp38-cp38-win_amd64.whl",
"has_sig": false,
"md5_digest": "cd17bff1899e356200c192030ffabb8b",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.7",
"size": 43080,
"upload_time": "2024-06-02T15:13:30",
"upload_time_iso_8601": "2024-06-02T15:13:30.473454Z",
"url": "https://files.pythonhosted.org/packages/fd/5f/b5369fa464139e32eb2a0d18fddb82f45709b595942effdd6b7da52650c8/cython_xinput-0.1.0-cp38-cp38-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b85c836b0636be434e832462d11a27a9df6b4e8ce5b2fac1850d259a4cd4b3b8",
"md5": "00ca6c43aa5b2f1a01c829a300499748",
"sha256": "8612e162a178bf84adb1704846a3b5e426db2ac3aeccd242277c133a9b15a5ff"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp39-cp39-win32.whl",
"has_sig": false,
"md5_digest": "00ca6c43aa5b2f1a01c829a300499748",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.7",
"size": 38041,
"upload_time": "2024-06-02T15:13:33",
"upload_time_iso_8601": "2024-06-02T15:13:33.168071Z",
"url": "https://files.pythonhosted.org/packages/b8/5c/836b0636be434e832462d11a27a9df6b4e8ce5b2fac1850d259a4cd4b3b8/cython_xinput-0.1.0-cp39-cp39-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d242e44c298cbcc22d0eea7949dad2efdfa280e74c98f5d39bec82391cdc6f9",
"md5": "9af23dd0bcd02228a7377b5ce9ae66ef",
"sha256": "9a8451c3d434b6f0c39a7ee4c83e304ad45641426b571b4db3cf13d9169e536a"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "9af23dd0bcd02228a7377b5ce9ae66ef",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.7",
"size": 42954,
"upload_time": "2024-06-02T15:13:34",
"upload_time_iso_8601": "2024-06-02T15:13:34.128493Z",
"url": "https://files.pythonhosted.org/packages/3d/24/2e44c298cbcc22d0eea7949dad2efdfa280e74c98f5d39bec82391cdc6f9/cython_xinput-0.1.0-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23befc9d6a56a60f89b9a39f4d70c5beb3a8a75aae4f323d606a380b12f90772",
"md5": "5eaa85234fd828a7268c3ce9c5336c32",
"sha256": "92dff70cb41e8d6744e0e7ab56e83fd202e3f05c15f569f923fc0d989fe1bf01"
},
"downloads": -1,
"filename": "cython_xinput-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "5eaa85234fd828a7268c3ce9c5336c32",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5936,
"upload_time": "2024-06-02T15:13:36",
"upload_time_iso_8601": "2024-06-02T15:13:36.783890Z",
"url": "https://files.pythonhosted.org/packages/23/be/fc9d6a56a60f89b9a39f4d70c5beb3a8a75aae4f323d606a380b12f90772/cython_xinput-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-02 15:13:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zariiii9003",
"github_project": "cython_xinput",
"github_not_found": true,
"lcname": "cython-xinput"
}