# Shotgun API wrapper for query fields

**URL:** <https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720>\
**Category:** Pipeline Integrations\
**Created:** [January 14, 2025, 5:32pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720 "2025-01-14T17:32:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinsallee](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/kevinsallee/32/7074_2.png) [@kevinsallee](https://community.shotgridsoftware.com/u/kevinsallee)\
**Post date:** [January 14, 2025, 5:32pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720/1 "2025-01-14T17:32:10Z")

</div>

Hey all, I had the need for other projects to be able to retrieve query fields from the API, and this is not possible with the current API.

So I did a wrapper, which is thread safe, so it makes all the query fields retrieval for each Entity in parallel.

PyPi page: [https://pypi.org/project/fpt-api](https://pypi.org/project/fpt-api)  
Github page: [GitHub - ksallee/fpt-api: A wrapper around shotgun\_api3 to allow retrieval of query fields/calculated fields](https://github.com/ksallee/fpt-api)

If you test it and like it, please leave a star on Github.  
If you want to contribute, please send me a message or make a pull request/issue on Github!

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [January 14, 2025, 5:45pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720/2 "2025-01-14T17:45:29Z")

</div>

Hey Kevin,

there is also this repo that does something similar.

> [@API to get query field values](https://community.shotgridsoftware.com/t/api-to-get-query-field-values/11263/17):
>
> Hey everyone! I had to build a solution to this problem with a project that I was working on recently. I remembered coming accross this thread and thought I would share what I came up with. I did my best to package up the functionality that I thought would be helpful to other developers. [https://github.com/mbsurfer/shotgun-extensions](https://github.com/mbsurfer/shotgun-extensions) Importing this package will give you access to new versions of the find and find\_one methods you would traditionally use with the ShotGun class. How it works A…

---

<div class="post-metadata">

**Author:** ![kevinsallee](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/kevinsallee/32/7074_2.png) [@kevinsallee](https://community.shotgridsoftware.com/u/kevinsallee)\
**Post date:** [January 14, 2025, 6:01pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720/3 "2025-01-14T18:01:52Z")

</div>

Yeah, I think I had seen it, but maybe it was another one?

But it doesn’t fix the thread safe pb of shotgun API so I don’t think it’s as fast as mine.

---

<div class="post-metadata">

**Author:** ![kevinsallee](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/kevinsallee/32/7074_2.png) [@kevinsallee](https://community.shotgridsoftware.com/u/kevinsallee)\
**Post date:** [January 15, 2025, 10:22pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-wrapper-for-query-fields/19720/4 "2025-01-15T22:22:58Z")

</div>

I added `yield_page_entities` method to allow to fetch entities from a SG page by applying the same filters as the SG page 🙂
