Right now, Magic only works in the main Python app file, not in imported files. See GitHub issue #288 for a discussion of the issues.
### Featured video
Learn what the [`st.write`](/develop/api-reference/write-magic/st.write) and [magic](/develop/api-reference/write-magic/magic) commands are and how to use them.