# Function Level Imports of Flame Module

**URL:** <https://forum.logik.tv/t/function-level-imports-of-flame-module/8823>\
**Category:** Python\
**Tags:** python\
**Created:** [July 21, 2023, 8:41pm UTC](https://forum.logik.tv/t/function-level-imports-of-flame-module/8823 "2023-07-21T20:41:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knhn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/knhn/32/5635_2.png) [@knhn](https://forum.logik.tv/u/knhn)\
**Post date:** [July 21, 2023, 8:41pm UTC](https://forum.logik.tv/t/function-level-imports-of-flame-module/8823/1 "2023-07-21T20:41:10Z")

</div>

Hi hi!

I was wondering if anyone could shed light on why it seems to be the common practice to import the Flame module inside of functions instead of a top level module import like the PEP8 standard?

I have not experienced any issues thus far by doing top level imports… but perhaps Ive only been lucky.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![knhn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/knhn/32/5635_2.png) [@knhn](https://forum.logik.tv/u/knhn)\
**Post date:** [July 21, 2023, 8:42pm UTC](https://forum.logik.tv/t/function-level-imports-of-flame-module/8823/2 "2023-07-21T20:42:51Z")

</div>

I suppose to specifically call an example, i see this in `/opt/Autodesk/flame_####.#/python_examples/create_user_shared_library.py`

---

<div class="post-metadata">

**Author:** ![claussteinmassl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/claussteinmassl/32/1922_2.png) [@claussteinmassl](https://forum.logik.tv/u/claussteinmassl)\
**Post date:** [July 24, 2023, 10:19am UTC](https://forum.logik.tv/t/function-level-imports-of-flame-module/8823/3 "2023-07-24T10:19:10Z")

</div>

I was wondering about the same thing. I always do top level imports, but noticed one thing:  
The flame module seems to be not available yet while the python scripts are crawled during startup. I get messages like “no module found called flame”. On runtime there are no issues and the module is loaded as expected.
