This is basic micropython API for the SHT40 temperature sensor which works with micropython. The adafruit driver was built for circuit python and this ensures it works for micropython without other depedencies. This builds a temperature reader with teh adafruit SHT40 reader. This is basic setup which provides terminal readout from the sensor.
This article provides a nice summary of setting up NodeMCU with micropython. This should work for blank NodeMCU or one with material already. https://www.embedded-robotics.com/esp8266-micropython/.
This provides very good setup and I suggest using Thonny app for develompent. https://www.embedded-robotics.com/esp8266-micropython/
To start, I am setting up the NodeMCU with fresh micropython. I am going to use this reference to to complete the setup. My setup is on Linux, so here is some helpful howtos on setup:
from sht40_micropython import SHT40
# this is example setup on the nodemcu ESP8266 board
sht40 = SHT40(scl_pin=4, sda_pin=3, freq=config.board_baud_rate)
results = sht40.measure()
print(results)