GameSir T1d Pygame Wrapper
A Python package that provides a Pygame-compatible interface for the GameSir T1d controller, making it easy to use in Pygame applications. This package handles BLE connections, reconnections, and provides a convenient API.
Features
- Bluetooth Low Energy (BLE) connection to GameSir T1d controllers
- Automatic reconnection handling
- Pygame-compatible interface for easy integration
- Raw controller data access
- Mapped buttons and axes with proper normalization
- BLE scanner tool to discover controller names
Installation
pip install gamesir-t1d
Or with uv:
uv add gamesir-t1d
Finding Your Controller Name
Before using the package, you need to know your controller's exact name. Each GameSir T1d controller broadcasts with a name like "Gamesir-T1d-XXXX" where XXXX is a unique identifier.
Use the included scanner tool to discover your controller:
# After installing the package
gamesir-scan
Make sure your controller is turned on and in pairing mode (typically hold the power button until LEDs flash rapidly). The scanner will show all discovered Bluetooth devices and try to identify GameSir controllers.
The scanner has additional options:
# Skip the "Press Enter" prompt and start scanning immediately
gamesir-scan --no-prompt
# Adjust the scan timeout (in seconds)
gamesir-scan --timeout 5.0
# Get help on available options
gamesir-scan --help
Basic Usage
from gamesir_t1d import GameSirT1dPygame
# Create the controller object with your controller's name
controller = GameSirT1dPygame("Gamesir-T1d-XXXX") # Replace XXXX with your controller ID
# Initialize the controller (starts BLE connection)
controller.init()
# Read axes and buttons using the pygame-compatible interface
left_x = controller.get_axis(0) # Range: -1.0 to 1.0
left_y = controller.get_axis(1) # Range: -1.0 to 1.0
a_button = controller.get_button(0) # 1 for pressed, 0 for not pressed
# Check if the controller is connected
if controller.is_connected():
print("Controller is connected!")
# Clean up when done
controller.quit()
Pygame Example
The package includes an example Pygame application that demonstrates how to use the controller:
# Assuming you've installed the package with the [examples] extra
# pip install gamesir-t1d[examples]
from gamesir_t1d.examples import run
# Run the demo
run("Gamesir-T1d-XXXX") # Replace XXXX with your controller ID
License
MIT License - see the LICENSE file for details.
Metadata
Release files for gamesir-t1d 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gamesir_t1d-0.1.3.tar.gz | 34.8 kB | Without provenance | Details for gamesir_t1d-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gamesir_t1d-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for gamesir_t1d-0.1.3-py3-none-any.whl |
Total release size: 45.5 kB
Release files / gamesir_t1d-0.1.3.tar.gz
| Download URL | gamesir_t1d-0.1.3.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d6a86699d26b288fd9768af1d7ff6b70488c2f073b315710def9ff2d68cff9e
|
|
BLAKE2b-256 checksum How to use checksums |
cd59c4bba0f52c1e1a306cb022bd1bbe28e0d593ab8e6b13b0d45beab41df084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.1
|
Release files / gamesir_t1d-0.1.3-py3-none-any.whl
| Download URL | gamesir_t1d-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70c726bb73ee33f88d6c1678b7d6d3ad3fb0df2a931f3803cfaf5c38762f065c
|
|
BLAKE2b-256 checksum How to use checksums |
39b8457d361795c41c645fc3be7329383d678386f20e83c66b06af33b11d2ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.1
|
Security for gamesir-t1d 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.