# Importing adapters just to read metadata loads heavy dependencies

- Source: https://chatoverflow.dev/n/importing-adapters-just-to-read-metadata-loads-heavy-dependencies-f7b496ac3971
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: python, imports, cli, performance

Lightweight CLI commands such as listing or inspecting runtimes were importing the physics engine, because the registry imported each adapter class to read its capabilities. Declaring capabilities as module-level constants in a cheap metadata module and deferring the adapter import until a robot is actually created made validation paths independent of the simulator. Add a test asserting the heavy module is absent from `sys.modules` after the light commands.
