TOPdesk Python
Use this skill for production-grade Python in TOPdesk projects.
Workflow
- Identify whether the task is API/OData, export profiling, transformation, validation, artifact generation, or packaging.
- Prefer standard-library implementations unless the repo already uses a dependency or the task clearly requires one.
- Build CLIs with
argparse, deterministic output paths, explicit encodings, and nonzero exit codes on failure. - Use structured parsers for JSON, CSV, XML, and ZIP files. Avoid ad hoc parsing when a standard module exists.
- Keep secrets out of code. Read credentials from environment variables or explicit runtime parameters.
- Separate pure transformation functions from I/O so behavior is testable.
- Run
scripts/validate_topdesk_python.pyagainst generated scripts when practical.
References
Load only what is needed:
references/python-patterns.mdfor CLI architecture, file safety, testing, API clients, and packaging.references/topdesk-python-recipes.mdfor TOPdesk OData/API, CSV profiling, metadata parsing, and report generation recipes.
Assets
Use assets/topdesk_cli_template.py as the starting point for new Python CLIs.