Zelesis Neo API Python Bindings
Project description
Zelepy
Zelepy is a Python wrapper for the Zelesis Neo API, allowing you to communicate with the Zelesis Neo software from Python.
Installation
pip install zelepy
Features
- Event Listening: Listen for Neo events over UDP (detections, triggerbot, etc.)
- Command Broadcasting: Send commands to control Zelesis Neo (mouse movement, clicks, detection requests)
- Configuration Management: Read and write Zelesis Neo configuration files
- Helper Utilities: Get installation paths, versions, and image compression utilities
Quickstart
Zelesis Client
The Zelesis Client is used to broadcast or listen for events via UDP. It can be initialized via:
from zelepy.events import ZelesisClient
client = ZelesisClient()
client.start()
Remember when you are finished with the client to run
client.stop()
Or, you can simply use the client like a context manager, which will not require you to stpo the client once you are finished with it:
from zelepy.events import ZelesisClient
with ZelesisClient() as client:
print(f"Client is running: {client.is_running}")
When initializing you can set options:
from zelepy.events import ZelesisClient
client = ZelesisClient(
receive_port: int = 26512, # Port to listen for events
send_port: int = 26513, # Port to send commands
target_ip: str = "127.0.0.1", # IP address of Zelesis Neo
timeout: float = 2.0 # Command response timeout (seconds)
)
Event Listening
from zelepy.events import ZelesisClient
def on_detection(event):
print(f"Detection: {event}")
def on_triggerbot(event):
print(f"Triggerbot: {event}")
def on_any_event(event):
print(f"Recieved an event: {event}")
with ZelesisClient() as client:
# You can subscribe to specific events
client.subscribe("detection", on_detection)
client.subscribe("triggerbot", on_triggerbot)
# Or you can create a generic listener that will be called whenever ANY event is received
client.add_event_listener(on_any_event)
# You must start the client to be able to listen to events
client.start()
# Client runs until context exits
Event Broadcasting
Mouse Functions
from zelepy.events import ZelesisClient
with ZelesisClient() as client:
# No need to run client.start() here as its being used as a context manager
# Move mouse by x, y pixels. Note that this is relative to its current position, rather than moving to an absolute position on screen
client.move_mouse(100, 50)
# Left click the mouse
client.click_mouse()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zelepy-0.0.4.tar.gz.
File metadata
- Download URL: zelepy-0.0.4.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
402dd07977bb805802431ce4c02db1adbd04365eb85b041c998c49c1fb78a366
|
|
| MD5 |
1072e921ffce46eb35bf5182382b7345
|
|
| BLAKE2b-256 |
2a256e89ea4ba3c5d28082d0a88f36d844f9e7b6c69700e9e5caa4af2a2b365e
|
File details
Details for the file zelepy-0.0.4-py3-none-any.whl.
File metadata
- Download URL: zelepy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1211e5e0624840eec1744e5e1479f82c99d6de2ae10c3ab1da95e2ba7b118b
|
|
| MD5 |
3f6117aa3da90199d0d2b0645349c3f3
|
|
| BLAKE2b-256 |
b3f997f3b97055fb4783e71c1b9a3dd76801ea669148e783a0580cac4dc9c8f4
|