# Import Shotgun Toolkit Frameworks into tk-shotgun-ami hooks

**URL:** <https://community.shotgridsoftware.com/t/import-shotgun-toolkit-frameworks-into-tk-shotgun-ami-hooks/4631>\
**Category:** Pipeline Integrations\
**Tags:** hooks, frameworks\
**Created:** [January 16, 2020, 9:24pm UTC](https://community.shotgridsoftware.com/t/import-shotgun-toolkit-frameworks-into-tk-shotgun-ami-hooks/4631 "2020-01-16T21:24:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![philip.scadding](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/philip.scadding/32/30_2.png) [@philip.scadding](https://community.shotgridsoftware.com/u/philip.scadding)\
**Post date:** [January 17, 2020, 10:18am UTC](https://community.shotgridsoftware.com/t/import-shotgun-toolkit-frameworks-into-tk-shotgun-ami-hooks/4631/2 "2020-01-17T10:18:17Z")

</div>

Hi Devottam

Welcome to the forums!  
If you are loading the framework in a hook you can use the [`load_framework()` method](https://developer.shotgunsoftware.com/tk-core/core.html#sgtk.Hook.load_framework)

Also mentioned here:

> [@How can I load a Toolkit framework in my hook?](https://community.shotgridsoftware.com/t/how-can-i-load-a-toolkit-framework-in-my-hook/115):
>
> [Toolkit frameworks](https://developer.shotgunsoftware.com/tk-core/platform.html#frameworks) can be useful for writing code that can be then reused in a number of different Apps or Engines. Normally if you are writing a custom App or Engine, you would import the framework using sgtk.platform.import\_framework(), and this requires that the App sets the framework as a dependency in the [app’s info.yml](https://github.com/shotgunsoftware/tk-multi-workfiles2/blob/3566876b4ec5c9afc7a8ae453f088fbd427a9794/info.yml#L253-L256). Frameworks in App hooks However, if you want to use a framework, in an App hook you can do so using the Hook class’s [load\_framework()](https://developer.shotgunsoftware.com/tk-core/core.html?highlight=load_framework#sgtk.Hook.load_framework). This method allows you to impo…

Best  
Phil

---

_[View the full topic](https://community.shotgridsoftware.com/t/import-shotgun-toolkit-frameworks-into-tk-shotgun-ami-hooks/4631)._
