{"id":37077686,"url":"https://github.com/simplehydrogen/pyxboxcontroller","last_synced_at":"2026-01-14T09:00:46.596Z","repository":{"id":61760347,"uuid":"554822150","full_name":"SimpleHydrogen/pyxboxcontroller","owner":"SimpleHydrogen","description":"A simple library for getting the state of a connected XInput device (such as an xbox controller) in Windows.","archived":false,"fork":false,"pushed_at":"2023-06-24T14:08:23.000Z","size":492,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T09:02:20.438Z","etag":null,"topics":["controller","xbox","xbox-controller"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimpleHydrogen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-20T13:05:34.000Z","updated_at":"2025-08-25T07:40:22.000Z","dependencies_parsed_at":"2023-01-21T22:04:16.661Z","dependency_job_id":"df3167cb-7b34-4a8a-adad-2fb8c75853be","html_url":"https://github.com/SimpleHydrogen/pyxboxcontroller","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/SimpleHydrogen/pyxboxcontroller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleHydrogen%2Fpyxboxcontroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleHydrogen%2Fpyxboxcontroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleHydrogen%2Fpyxboxcontroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleHydrogen%2Fpyxboxcontroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimpleHydrogen","download_url":"https://codeload.github.com/SimpleHydrogen/pyxboxcontroller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleHydrogen%2Fpyxboxcontroller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["controller","xbox","xbox-controller"],"created_at":"2026-01-14T09:00:42.356Z","updated_at":"2026-01-14T09:00:46.564Z","avatar_url":"https://github.com/SimpleHydrogen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyxboxcontroller\r\nThis module allows for accessing the current state of a connected Xbox controller via the [XInput library](https://learn.microsoft.com/en-gb/windows/win32/xinput/getting-started-with-xinput?redirectedfrom=MSDN#getting-controller-state) on Windows.\r\n\r\n## Installation\r\nSimply install using pip\r\n`pip install pyxboxcontroller`\r\n\r\n## Importing\r\n`from pyxboxcontroller import XboxController, XboxControllerState`\r\n\r\n## Connect to controller\r\nConnect to the controller with id (starting at 0) using:\r\n`controller = XboxController(id)`\r\n## Getting the current state of the controller\r\nThe current state of the controller can be gotten with:\r\n`state: XboxControllerState = controller.state`\r\nThis returns an `XboxControllerState` object.\r\n\r\n\r\nSome examples of accessing the states' values:\r\n```python\r\nleft_thumbstick_x: float = state.l_thumb_x\r\nright_thumbstick_y: float = state.r_thumb_y\r\nx_pressed: bool = state.x\r\nlb_pressed: bool = state.lb\r\n```\r\n\r\nAlternately the state of the button (e.g. x) can be gotten with:\r\n` button_pressed: bool = state.buttons[\"x\"]`\r\n\r\n## Examples\r\nTo see this code in action, why not try out:\r\n```python\r\nfrom pyxboxcontroller.examples import example_state_gui\r\nexample_state_gui()\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplehydrogen%2Fpyxboxcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplehydrogen%2Fpyxboxcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplehydrogen%2Fpyxboxcontroller/lists"}