python classes for hardware