Programmatic method to determine board type?

Programmatic method to determine board type? Say tell the difference between ‘ESP32 Stick’ verus ‘AI-On-The-Edge’ boards? Want to do this via CircuitPython or MicroPython (preferred).