LogiPy
This package is a python wrapper for Logitech G’s LED and Arx SDKs.
Use the LED SDK to get access to all of the LED backlighting and RGB capabilities of Logitech G products. Integrate profiles for custom key configurations, develop in-game effects, or mark keys to keep track of cool downs on various commands.
Arx Control introduces second screen capability that allows iOS and Android mobile devices to display in-game info, vital system statistics and more. The associated SDK enables integration of your code with the Arx Control app.
LED Examples
Set all device lighting to red:
from logipy import logi_led import time import ctypes logi_led.logi_led_init() time.sleep(1) # Give the SDK a second to initialize logi_led.logi_led_set_lighting(100, 0, 0) logi_led.logi_led_shutdown()
Or if you prefer the c/c++ style you can use the LED DLL directly:
from logipy import logi_led import time import ctypes logi_led.led_dll.LogiLedInit() time.sleep(1) # Give the SDK a second to initialize logi_led.led_dll.LogiLedSetLighting(ctypes.c_int(0), ctypes.c_int(100), ctypes.c_int(0)) logi_led.led_dll.LogiLedShutdown()
Load user configured settings for your LED effects:
from logipy import logi_led
import time
import ctypes
logi_led.led_dll.LogiLedInit()
time.sleep(1) # Give the SDK a second to initialize
effect_enabled = logi_led.logi_led_get_config_option_bool('effect/enabled', True) # Use a default value if not found
effect_duration = logi_led.logi_led_get_config_option_number('effect/duration', 5)
effect_color = logi_led.logi_led_get_config_option_color('effect/color', Color(0, 255, 0))
logi_led.logi_led_set_config_option_label('effect', 'Effect Settings')
logi_led.logi_led_set_config_option_label('effect/enabled', 'Enabled')
logi_led.logi_led_set_config_option_label('effect/duration', 'Duration in seconds')
logi_led.logi_led_set_config_option_label('effect/color', 'Color')
if effect_enabled:
logi_led.logi_led_set_lighting(*effect_color.rgb_percent())
time.sleep(effect_duration)
logi_led.led_dll.LogiLedShutdown()
Arx Examples
Show a simple applet with the default callback:
from logipy import logi_arx
import time
index = """
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, target-densityDpi=device-dpi, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<img id="splash-icon" src="http://gaming.logitech.com/images/logos/gamingLogo-lg.png" />
</body>
</html>
"""
css = """
body {
background-color: black;
}
img {
position: absolute;
top: 50%;
left: 50%;
width: 118px;
height: 118px;
margin-top: -59px;
margin-left: -59px;
}
"""
logi_arx.logi_arx_init("com.logitech.gaming.logipy", "LogiPy")
time.sleep(1)
logi_arx.logi_arx_add_utf8_string_as(index, "index.html", "text/html")
logi_arx.logi_arx_add_utf8_string_as(css, "style.css", "text/css")
logi_arx.logi_arx_set_index("index.html")
logi_arx.logi_arx_shutdown()
Show a simple applet with a custom callback:
from logipy import logi_arx
import time
import ctypes
index = """
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, target-densityDpi=device-dpi, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<img id="splash-icon" src="http://gaming.logitech.com/images/logos/gamingLogo-lg.png" />
</body>
</html>
"""
css = """
body {
background-color: black;
}
img {
position: absolute;
top: 50%;
left: 50%;
width: 118px;
height: 118px;
margin-top: -59px;
margin-left: -59px;
}
"""
def custom_callback(event_type, event_value, event_arg, context):
if event_arg and event_arg == 'splash-icon':
print "\nNo wonder Logitech is called Logicool in Japan! They are so cool!"
logi_arx.logi_arx_init("com.logitech.gaming.logipy", "LogiPy", custom_callback)
time.sleep(1)
logi_arx.logi_arx_add_utf8_string_as(index, "index.html", "text/html")
logi_arx.logi_arx_add_utf8_string_as(css, "style.css", "text/css")
logi_arx.logi_arx_set_index("index.html")
logi_arx.logi_arx_shutdown()
Metadata
Release files for logipy 1.3.1
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 |
|---|---|---|---|---|
| logipy-1.3.1.zip | 13.4 kB | Without provenance | Details for logipy-1.3.1.zip |
Release files / logipy-1.3.1.zip
| Download URL | logipy-1.3.1.zip |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93fbb04a86c53401d23cf207606715e82f72a66999293c28d4e14c0168994b29
|
|
BLAKE2b-256 checksum How to use checksums |
e8aadf4b55f3721c79e52693f11f6a6e97fe252a403f55e055da640faf78cb2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for logipy 1.3.1
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.