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. No network access, no telemetry, no automatic uploads.
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.
Published alpha preview (0.1.0a3). Development source is the unreleased 0.1.0a4 candidate. 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.0a3
For optional pytest integration:
python -m pip install "iot-fixturekit[pytest]==0.1.0a3"
PyPI · GitHub release files and SHA256 checksums. Both distribution hashes match the published GitHub release.
Start here
See QUICKSTART.md for installation and the five-minute local consumer demo; see CONTRIBUTING.md for pilot feedback.
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.0a3
hooks:
- id: iot-fixture-audit
``` 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](examples/pilot/TUYA.md) 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](examples/pilot/OVERKIZ.md).
## 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:
```yaml
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 (development source)
The opt-in kasa profile checks selected pairing-related fields after upstream
masking. See the synthetic pilot and compatibility evidence.
Not yet included in published alpha 3. No comprehensive device schema or privacy
guarantee is claimed.
PyISYox response pilot (development source)
The opt-in pyisyox profile checks whether the upstream-sensitive
ssl JSON field has been masked. See the synthetic pilot.
Not included in published alpha 3. Generic checks and manual review
remain necessary.
Plugwise XML pilot (development source)
The opt-in plugwise profile checks documented XML placeholder values
using bounded XML parsing. See the synthetic pilot.
Not included in published alpha 3. Keep upstream checks and manual review.
Metadata
Release files for iot-fixturekit 0.1.0a4
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.0a4.tar.gz | 44.4 kB | With provenance | Details for iot_fixturekit-0.1.0a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iot_fixturekit-0.1.0a4-py3-none-any.whl | Python 3 | none | any | Details for iot_fixturekit-0.1.0a4-py3-none-any.whl |
Total release size: 65.5 kB
Release files / iot_fixturekit-0.1.0a4.tar.gz
| Download URL | iot_fixturekit-0.1.0a4.tar.gz |
|---|---|
| Size | 44.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e18b382a473c69786ef5ffefb1a315999b0194f9db01891872003bb7daa0897e
|
|
BLAKE2b-256 checksum How to use checksums |
1c26dbdfc1b123bddc15bbfb4180128616120a38695fec433cd969bad319ceaa
|
| 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 1, 2026.
Transparency logRelease files / iot_fixturekit-0.1.0a4-py3-none-any.whl
| Download URL | iot_fixturekit-0.1.0a4-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbdbc060a0060e5e8d4fb89ffc18e9924cc69ee790d0b69d0306ffd4d87d0e8c
|
|
BLAKE2b-256 checksum How to use checksums |
f6a819c2a6d7ebb9d6d9eb260c976455eb553c60850a0c6738ee17b1db875d41
|
| 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 1, 2026.
Transparency logSecurity for iot-fixturekit 0.1.0a4
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.0a4.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 1, 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.