Getting Started¶
Welcome to LIFX Emulator! This section will help you get up and running quickly.
Choose Your Package¶
LIFX Emulator is available as two packages:
| Package | Best For |
|---|---|
lifx-emulator |
CLI tool, web dashboard, quick testing |
lifx-emulator-core |
Embedding in Python applications, pytest |
Learning Path¶
CLI Users (lifx-emulator)¶
- Installation - Install the CLI tool
- Quick Start - Start emulating devices
- CLI Reference - All command-line options
Library Users (lifx-emulator-core)¶
- Installation - Install the library
- Quick Start - Programmatic usage
- API Reference - Python API documentation
Quick Preview¶
import asyncio
from lifx_emulator import EmulatedLifxServer
from lifx_emulator.factories import create_color_light
from lifx_emulator.repositories import DeviceRepository
from lifx_emulator.devices import DeviceManager
async def main():
device = create_color_light("d073d5000001")
device_manager = DeviceManager(DeviceRepository())
async with EmulatedLifxServer(
[device], device_manager, "127.0.0.1", 56700
) as server:
print(f"Emulating: {device.state.label}")
await asyncio.Event().wait()
asyncio.run(main())
Prerequisites¶
- Python 3.11+ (or let uv manage it for you)
- Basic understanding of Python or command-line tools
- (Optional) Familiarity with LIFX devices or protocol
Why uv?¶
We recommend uv because it:
- Automatically manages Python versions for you
- Is significantly faster than pip
- Handles virtual environments seamlessly
- Works consistently across platforms
Next Steps¶
Once you've completed the getting started guide, explore:
- User Guides - Deeper understanding of features
- Tutorials - Hands-on learning with examples
- API Reference - Complete API documentation