python-azure-iot-edge-modules
Build and operate Python Azure IoT Edge modules with robust messaging, deployment manifests, observability, and production readiness checks.
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Python Azure IoT Edge Modules
Use this skill to design, implement, and validate Python-based IoT Edge modules for telemetry processing, local inference, protocol translation, and edge-to-cloud integration.
When To Use
Use this skill for requests like:
- "quiero crear un modulo Python para IoT Edge"
- "como despliego modulos edge con manifest"
- "necesito filtrar/agregar telemetria antes de subirla"
- "como manejo desconexiones y reintentos en edge"
Mandatory Docs Review
Before recommending runtime behavior or deployment decisions, review:
- https://learn.microsoft.com/azure/iot-edge/
- https://learn.microsoft.com/es-es/azure/iot-edge/
Minimum checks:
- Runtime architecture and module lifecycle.
- Supported host OS and versions.
- Deployment model and configuration flow.
- Current release/version guidance.
If documentation cannot be fetched, proceed with explicit assumptions and flag them clearly.
Python Official References and Best Practices (Required)
Before proposing Python implementation details, consult official Python sources:
- https://www.python.org/
- https://docs.python.org/3/
- https://docs.python.org/3/reference/
- https://docs.python.org/3/library/
- references/python-official-best-practices.md
Prefer official docs over community snippets unless there is a specific compatibility reason to deviate.
Goals
- Deliver module architecture and implementation plan that is production-focused.
- Ensure reliable edge messaging under network variability.
- Provide deployment, observability, and validation artifacts.
Module Use Cases
- Protocol adapter (serial/Modbus/OPC-UA to IoT message format).
- Telemetry enrichment and normalization.
- Local anomaly detection or inference.
- Command orchestration and local actuator control.
Delivery Workflow
1) Contract and Interfaces
Define:
- Module inputs and outputs.
- Message schema and versioning policy.
- Routes and priorities for normal vs critical telemetry.
- Desired properties used for dynamic configuration.
2) Runtime and Packaging
Specify:
- Python runtime version target.
- Container image strategy (base image, slim footprint, CVE hygiene).
- Resource profile (CPU/memory bounds).
- Startup and health checks.
3) Reliability Design
Implement and validate:
- Retries with exponential backoff and jitter.
- Graceful degradation on upstream failures.
- Local queueing strategy where needed.
- Idempotent processing for replayed messages.
4) Security Controls
Require:
- No plaintext secrets in code or manifest.
- Least-privilege module behavior.
- Secure transport and trusted cert chain handling.
- Traceability for command handling and state changes.
5) Deployment and Operations
Define:
- Environment-specific deployment manifests.
- Rollout strategy (pilot, staged, broad).
- Rollback criteria.
- SLOs and alerting conditions.
Reuse Other Skills
When relevant, combine with:
azure-smart-city-iot-solution-builderfor platform-level architecture.appinsights-instrumentationfor telemetry instrumentation approaches.azure-resource-visualizerfor architecture diagrams and dependency mapping.
Also use references/python-official-best-practices.md as baseline quality criteria for module design and implementation guidance.
Required Output
Always provide:
- Module design brief (purpose, inputs, outputs).
- Deployment model (image, manifest, env settings).
- Reliability and error-handling strategy.
- Security and operations checklist.
- Test matrix (functional, chaos, performance, rollback).
Output Template
Use references/python-edge-module-template.md to structure implementation proposals and reviews.
- Context and assumptions
- Module architecture
- Deployment and configuration
- Reliability, security, observability
- Validation and rollout plan
Guardrails
- Do not recommend direct production rollout without pilot stage.
- Do not embed secrets in Dockerfiles, source, or manifests.
- Do not omit health probes, restart behavior, and rollback criteria.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。