This release is a pre-release and may not be stable for production use.
IoT FixtureKit
Experimental local-first tooling for converting IoT diagnostics into reproducible test fixtures. The core runs offline, with no telemetry or automatic uploads. Optional lab setup can fetch public dependencies and source checkouts.
Home Assistant integration authors frequently need real device behavior to write regression tests. Different projects maintain their own diagnostic-to-fixture workflows. This experiment tests whether an explicit projection engine can reduce that maintenance without replacing their existing protocol libraries or tests.
Alpha preview (0.1.0a7). Independent security review is pending. No privacy certification or upstream endorsement is claimed.
Install the published alpha
In a virtual environment (Python 3.9+):
python -m pip install iot-fixturekit==0.1.0a7
For optional pytest integration:
python -m pip install "iot-fixturekit[pytest]==0.1.0a7"
PyPI · GitHub release files and SHA256 checksums. Both distribution hashes match the published GitHub release.
Start here
See the current quickstart for a first audit without Git or uv, then the bundled consumer demo; see CONTRIBUTING.md for pilot feedback. Inspect the recorded Studio demo before installing anything. It contains four synthetic reports from a completed first-party CI run, not live results. The separate extended demo records 47 checks from a local first-party macOS execution, including optional network pilots.
See the public roadmap and beta readiness gates for current priorities and release criteria. The compatibility contract describes current formats and migration discipline; the threat model explains trust and resource boundaries. Try the optional offline HTTP replay example with VCR.py. See also the optional DeepDiff comparison example and disposable Home Assistant virtual-device lab. The shared climate scenarios combines these engines in two experimental workflows: unavailable/recovery and frozen sensor/recovery. Run the bundled lab with one command and get a structured JSON report. Run the four supported synthetic observations and generate a combined dashboard with the Studio unified runner. Optional Studio setup fetches pinned public sources and dependencies; the core remains offline. For real loopback TCP faults, see the optional Toxiproxy network chaos pilot.
Run the synthetic demo
Python 3.9+; no runtime dependencies.
PYTHONPATH=src python3 -m iot_fixturekit.cli examples/synthetic-diagnostics.json --policy examples/synthetic-policy.json --profile demo
PYTHONPATH=src python3 -m unittest discover -s tests -v
Unknown object fields are excluded. Selected strings must match declared enum values. Numbers require explicit bounds. Invalid input is rejected. The complete projection policy is validated before use, even for empty arrays. Policies are limited to 64 nested levels and 10,000 rules. The projection engine additionally limits a projection to 200,000 emitted JSON values across all containers, including repeated input references. This is a node-count limit, not a byte-size or execution-time guarantee. The CLI also limits serialized ASCII JSON to 8 MiB, including the logical final newline. It rejects oversized output before writing. These defensive limits are not a complete memory or time isolation guarantee. The output is versioned and deterministic.
Important security boundary
This is NOT a complete anonymizer, secret scanner, or privacy guarantee. A poorly designed policy can retain sensitive values, keys or measurements. Review policy semantics and output locally before sharing. Do not commit raw diagnostics, credentials, real device identifiers or customer data. No live device adapters are implemented yet. All examples are synthetic.
Pilot validation
Start with maintainer-approved, narrowly scoped adapters for existing fixture workflows. Do not request upstream adoption until compatibility and maintenance benefit have been demonstrated. Research notes are maintained separately in the repository.
Fixture audit (experimental)
Run on an already-reviewed candidate fixture, not as a replacement for redaction:
PYTHONPATH=src python3 -m iot_fixturekit.audit --profile tuya examples/synthetic-tuya-fixture.json
Generic mode checks JSON/HAR structures and plain-text patterns (including XML). Tuya mode additionally checks selected requirements documented by Tuya Device Handlers. Reports contain file ordinals, rule IDs and line numbers (0 for JSON structural checks), not paths or matched values. Exit 0 means no findings, 1 means findings, 2 means an input error. A clean result does NOT certify privacy. Unknown secrets, encoded strings, device identifiers and context-specific sensitive measurements may remain. Generic mode does not parse XML or JSONL structurally. No upstream adoption is claimed.
Tuya diagnostics adapter (experimental)
Create a local review candidate, not a publication-ready fixture:
mkdir -p raw/review
PYTHONPATH=src python3 -m iot_fixturekit.tuya examples/synthetic-tuya-diagnostics.json --output-dir raw/review
The adapter follows the documented Tuya Device Handlers extraction convention: it selects the diagnostics data object, drops account-specific root keys, blanks device_info, preserves functional datapoints and preserves the case of the product ID. Filename components are restricted to safe alphanumeric forms. The candidate is audited before writing, created with exclusive access (no overwrite) and restrictive POSIX permissions. Review every field manually before sharing; unknown datapoints, device names, timestamps and encoded values may still contain personal data. The CLI never prints candidate values. Exit 1 indicates audit findings; exit 2 indicates invalid input or write failure. The ignored raw/ folder is recommended for private local work.
GitHub Actions consumer template
Copy the hash-pinned CI starter into your project and adapt its reviewed fixture directory. See setup notes.
Pytest integration
Install the package with its optional pytest extra. The pytest entry point automatically registers the callable fixture:
def test_device_fixture(iot_fixture_check):
iot_fixture_check("tests/fixtures/device.json", profile="tuya")
Use the default generic profile for other devices. Explicitly parametrize the files you want checked; there is no automatic repository-wide scanning. The plugin uses the same file audit as the CLI and reports only rule IDs. Avoid pytest options or custom plugins that dump sensitive local variables.
Pre-commit integration
For a local checkout of the package, use a local hook after installing it in the environment running pre-commit:
repos:
- repo: local
hooks:
- id: iot-fixture-audit
name: Audit IoT test fixtures
entry: iot-fixture-audit
language: system
types: [text]
files: '(^|/)(fixtures|golden)/.*\.(json|har|xml|jsonl|log|txt)$'
Consumers can also use the public hook pinned to the alpha release:
repos:
- repo: https://github.com/FlyzDev/fixturekit
rev: v0.1.0a7
hooks:
- id: iot-fixture-audit
See the pre-commit quickstart
for installation, targeted execution and expected results. Restrict the file
pattern to reviewed fixture directories; use separate hooks with
args: [--profile, tuya] where appropriate. No findings is not a privacy
guarantee, and a hook is not a substitute for human review.
Project-specific placeholder policies (experimental)
Some libraries intentionally preserve synthetic MAC addresses in test fixtures.
Use an explicitly reviewed JSON policy, such as
examples/synthetic-placeholder-policy.json, with the audit CLI:
iot-fixture-audit --policy examples/synthetic-placeholder-policy.json tests/fixtures/device.json
Pytest accepts the same file through policy_path; pre-commit can pass
args: [--policy, path/to/policy.json] on a JSON-only hook.
For Python callers, pass the parsed policy via the keyword-only policy
argument to audit_json or audit_file.
Version 1 supports exact typed JSON paths and exact full colon-delimited MAC placeholder values only. Integer path segments select array indexes; strings select object keys. No wildcard or regex exemptions, no credential-rule exemptions, and no exemption of object keys or Tuya structural checks. Policies are opt-in; the Tuya conversion CLI retains its original strict audit. Text formats do not accept policies. Keep policy files human-reviewed and use only known synthetic values, never actual device addresses. A policy is not evidence that a fixture is safe to publish.
Audit inputs are limited to 8 MiB per file, 64 nested path segments and 200,000 visited JSON nodes (including object keys). The JSON audit rejects non-finite numbers, unsupported Python values and unpaired Unicode surrogates. These are defensive limits, not a complete resource-isolation guarantee.
Text audit additionally limits input to 8,388,608 characters and output to 4,096 distinct line/rule findings per audit_text call. Exceeding a limit is an input error, never a clean scan. Email and JWT matching starts at token boundaries to avoid repeatedly scanning long runs of punctuation or token characters. These heuristics can miss unusual or embedded values.
License
Apache License 2.0. See LICENSE.
Tuya loader compatibility pilot
A generated synthetic fixture was successfully loaded by the pinned upstream Tuya Device Handlers test helper using the published alpha. See the reproducible pilot for the exact scope and checks.
Overkiz profile (experimental)
The opt-in JSON profile checks selected exact state names for unmasked values, including serial numbers, network identifiers and HomeKit setup states. It recognizes limited mask-only strings and explicit redaction placeholders; it does not validate all Overkiz fields or prove privacy. Use the upstream obfuscator first. Generic mode is unchanged.
iot-fixture-audit --profile overkiz tests/fixtures/setup/device.json
Pytest accepts profile="overkiz", and JSON pre-commit hooks can pass args: [--profile, overkiz]. MAC placeholder exceptions do not suppress semantic state findings. This profile was introduced in alpha 2.
Overkiz post-obfuscation pilot
The published alpha was tested as an additional non-mutating check after the pinned pyoverkiz obfuscator. See the pilot and its known gap.
Synthetic consumer pilot
The examples/pilot directory illustrates a fixture convention used by a device library: a fixed synthetic Wi-Fi MAC placeholder at status.wifi.mac. The example is independently constructed, incomplete and not an upstream fixture or a compatibility guarantee.
After installing the package in a separate project, a JSON-only pre-commit hook can pass the checked-in policy path as an argument:
repos:
- repo: local
hooks:
- id: fixturekit
name: FixtureKit audit
entry: iot-fixture-audit
language: system
args: [--policy, examples/pilot/shelly-style-policy.json]
files: '^tests/fixtures/.*\.json$'
Use the matching policy in pytest via policy_path. Keep policies under human review and do not apply the exception globally. This supplements, rather than replaces, device-library redactors. See the four pilot integration tests.
Kasa/Tapo pairing-field pilot
The opt-in kasa profile checks selected pairing-related fields after upstream
masking. See the synthetic pilot and compatibility evidence.
No comprehensive device schema or privacy
guarantee is claimed.
PyISYox response pilot
The opt-in pyisyox profile checks whether the upstream-sensitive
ssl JSON field has been masked. See the synthetic pilot.
Generic checks and manual review
remain necessary.
Plugwise XML pilot
The opt-in plugwise profile checks documented XML placeholder values
using bounded XML parsing. See the synthetic pilot.
Keep upstream checks and manual review.
Optional projection fields (alpha 5)
Object rules retain required keys listed in fields and may additionally
declare optional_fields. Missing optional values are omitted; present
values must satisfy the declared rule, including null or malformed inputs.
Unknown keys are excluded. Required and optional names must not overlap.
No implicit conversion or default is applied.
iot-fixturekit examples/pilot/mixed-events.json --policy examples/pilot/mixed-events-policy.json --profile events
See mixed-event example. This extension is available in alpha 5.
Embedded URI credentials (alpha 6)
A narrow additional rule detects nonempty username/password authorities in HTTP(S), RTSP(S), MQTT(S), Tapo, FTP(S) and SFTP URLs. Findings report only the rule identifier and location; no matched URI or credential is printed. This is a bounded heuristic, not a URL parser or complete secret scanner. It does not cover arbitrary schemes, query-string credentials, username-only authorities or every unusual encoding. Available in released alpha 6.
Documentation index
Plain-text documentation index with links to released features, examples and limitations.
Metadata
Release files for iot-fixturekit 0.1.0a8
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 |
|---|---|---|---|---|
| iot_fixturekit-0.1.0a8.tar.gz | 96.5 kB | With provenance | Details for iot_fixturekit-0.1.0a8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iot_fixturekit-0.1.0a8-py3-none-any.whl | Python 3 | none | any | Details for iot_fixturekit-0.1.0a8-py3-none-any.whl |
Total release size: 121.5 kB
Release files / iot_fixturekit-0.1.0a8.tar.gz
| Download URL | iot_fixturekit-0.1.0a8.tar.gz |
|---|---|
| Size | 96.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2fa4dcff0d1f59453a21b250da0c6a6148ffc12852ef9dc5ec58e64de9b3b23
|
|
BLAKE2b-256 checksum How to use checksums |
2bcf3e7e07d860b7ec0bd27cfe29795a70856a78d0b58d5d8e76300333099dd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logRelease files / iot_fixturekit-0.1.0a8-py3-none-any.whl
| Download URL | iot_fixturekit-0.1.0a8-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34c47a53d4d35b8614db7ab9f4af8c180c9fc3f9f588f2e9c3c30e6f2b2293ab
|
|
BLAKE2b-256 checksum How to use checksums |
02263462317e5049322c1aead2f618bfcf5bd742fda798e3fbcd2af070d1224c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Dec 2, 2026.
Transparency logSecurity for iot-fixturekit 0.1.0a8
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for iot_fixturekit-0.1.0a8.tar.gz
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 Dec 2, 2026.
Transparency logA 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.