Basic setup
Userun_multiple() to start multiple clients:
Using ready callbacks
Per-client ready callback
Execute code when each client becomes ready:All clients ready callback
Execute code once all clients are ready:Event handlers for multiple clients
Register event handlers for each client:Complete example from source
Here’s the actual example from the rebootpy repository:Managing clients
Accessing specific clients
Store clients in a dictionary for easy access:Tracking client state
Inter-client communication
Making clients interact
Party coordination
Advanced usage
Different configurations per client
Manual start/stop
For more control, usestart_multiple() and manage the event loop:
Context manager approach
Best practices
Use device auth for persistence
Use device auth for persistence
When running multiple clients, always use DeviceAuth to avoid repeated manual authentication:
Store credentials securely
Store credentials securely
Keep device auth credentials in a secure JSON file with appropriate permissions:
Track clients with IDs or names
Track clients with IDs or names
Use dictionaries to track clients for easy reference:
Handle errors per client
Handle errors per client
One client failing shouldn’t crash all clients. Use try/except blocks:
Be mindful of rate limits
Be mindful of rate limits
Running many clients increases the chance of hitting rate limits. Implement delays between operations:
Next steps
Client reference
Full Client class documentation
Device auth
Learn about DeviceAuth
Events reference
Understanding events
Party management
Managing parties across clients