Skip to main content

lifx-emulator-core

Core Python library for emulating LIFX devices using the LAN protocol.

This package provides the embeddable library for creating virtual LIFX devices in your own projects. It implements the binary UDP protocol from the LIFX LAN Protocol specification.

Installation

pip install lifx-emulator-core

Quick Start

import asyncio
from lifx_emulator import EmulatedLifxServer, DeviceManager
from lifx_emulator.factories import create_color_light
from lifx_emulator.repositories import DeviceRepository

async def main():
    # Create devices
    devices = [
        create_color_light(serial="d073d5000001"),
        create_color_light(serial="d073d5000002"),
    ]

    # Create repository and manager
    repository = DeviceRepository()
    manager = DeviceManager(repository)

    # Start the emulator server
    server = EmulatedLifxServer(
        devices=devices,
        device_manager=manager,
        bind_address="127.0.0.1",
        port=56700,
    )

    await server.start()
    print("LIFX Emulator running on 127.0.0.1:56700")

    # Keep running until interrupted
    try:
        await asyncio.Event().wait()
    finally:
        await server.stop()

asyncio.run(main())

mDNS interface limitation

mDNS is opt-in (mdns_enabled=True). On Linux, zeroconf may receive and answer mDNS queries through an interface other than the selected one when another process has joined the multicast group there. Selecting an interface, including loopback, is not a receive-isolation security boundary; synthetic device records may be visible on that other network. Strict isolation requires an external network boundary such as a dedicated network namespace or firewall policy. The emulator retains the public zeroconf API and does not patch its sockets to enforce receive isolation.

Features

  • Emulate color lights, multizone strips, tiles, infrared, HEV, and switch devices
  • Full LIFX LAN protocol implementation
  • Persistent device state storage
  • Testing scenarios for simulating edge cases
  • Product registry with 137+ official LIFX products

Documentation

Full documentation is available at: https://djelibeybi.github.io/lifx-emulator

  • lifx-emulator: Standalone CLI tool and HTTP management API built on this library

License

UPL-1.0

Metadata

Release files for lifx-emulator-core 3.12.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lifx-emulator-core 3.12.5
File Size Uploaded
lifx_emulator_core-3.12.5.tar.gz 243.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lifx-emulator-core 3.12.5
File Interpreter ABI Platform
lifx_emulator_core-3.12.5-py3-none-any.whl Python 3 none any Details

Total release size: 386.1 kB

Release files / lifx_emulator_core-3.12.5.tar.gz

Download URL lifx_emulator_core-3.12.5.tar.gz
Size 243.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c157bb265d59bbfa1fcdb754e0006c9384366071b7bc8d8d3551e1a5abfecede
BLAKE2b-256 checksum
How to use checksums
b4283cd4471cd2e352e3251f01ac2f97dc77d5942da516c635a295d1da71c0b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / lifx_emulator_core-3.12.5-py3-none-any.whl

Download URL lifx_emulator_core-3.12.5-py3-none-any.whl
Size 142.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98f1d63b3f3adafc178cc73a1dc0612f6ab65e1603c028dbbcf3a21ef52626bd
BLAKE2b-256 checksum
How to use checksums
cdff963582e46d77bd0b2dbb19997800f84afeacd6f1fd3bec77f06dade9b6d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

3.15.0

2 release files

3.14.0

2 release files

3.13.0

2 release files

This release

3.12.5 This release

2 release files

3.11.0

2 release files

3.10.0

2 release files

3.9.0

2 release files

3.8.0

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.3

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page