Integration of the Python script language into computer-aided design and simulation applications is considered. By the example of the physically correct optical simulation application, an approach based on the unified entity interface for domain objects is proposed. In particular, a scheme is proposed to extend the application with new types of parametric objects by writing extension classes that are simple in structure. Special attention is paid to making API user-friendly and ensuring compliance with the object-oriented programming principles.