Lightweight struct class for Python