If your module contains stored data in the form of an immutable object, like a string or bytes(), it will be read straight out of flash without copying to RAM first.
This needs you to run some code on a desktop computer to perform the freezing though.
https://docs.micropython.org/en/latest/reference/constrained...
Though I guess part of the pitch for micropython is being able to iterate without a flash step every time. Possibly addressed by having your dev boards fitted with a version of the MCU with enough RAM to run it all that way.
So a convenient workflow is to deploy at runtime (ie not in flash) until you stabilise your code base or approach production; at which point you can freeze your code into your firmware.
For an even more convenient model, there is the proposal to support 'mapfs' so that some flash will be allocated to store code. You can then compile your Python to bytecode (with `mpy_cross`) and upload it to - and run from - this area at runtime.
Although this feature has been demonstrated as a proof-of-concept, there are some subtleties to sort out before it hits mainline. If you're interested in the feature, please read or comment on the PR:
What stood out for me is the ability to pre-create constant objects and put them mostly into ROM, so that the RAM is only used for the actually mutable data. This is something you can't have with MicroPython or Lua, AFAICT, and this makes a lot of difference in MCUs where ROM / flash is plentiful, and RAM is scarce.