Exposing Item Type Information in Python#2608
Open
Atlamillias wants to merge 6 commits intohoffstadt:masterfrom
Open
Exposing Item Type Information in Python#2608Atlamillias wants to merge 6 commits intohoffstadt:masterfrom
Atlamillias wants to merge 6 commits intohoffstadt:masterfrom
Conversation
added 6 commits
February 21, 2026 20:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds a few new functions in
dearpygui.dearpyguithat expose system-level item type information that only exists in C++ source code, documentation context, or at runtime via DearPyGui error messages. This information is very useful for generating documentation, writing unit tests, and to anyone building on top of the library (wrappers, custom widgets, etc).New Functions:
get_item_type_parents(): Returns the result ofDearPyGui::GetAllowableParents()for all item types asdict[str, dict[str, int]]. Strings in the outer dictionary are qualified item type names, where the inner dictionaries contain the type information (as type name to enum value pairs) of items that can parent items of that type.get_item_type_children(): Similar toget_item_type_parents(), but returns child type information instead usingDearPyGui::GetAllowableChildren().get_item_type_states(): Returns a mapping of qualified item type names and tuples containing applicable/supported states.get_item_type_commands(): Returns a mapping of qualified item type names and names of their associated item command indearpygui.dearpygui.is_item_type_container(*item_type*): ReturnsTrueif item_type has theMV_ITEM_DESC_CONTAINERflag, andFalseotherwise.is_item_type_root_container(*item_type*): ReturnsTrueif item_type has theMV_ITEM_DESC_ROOTflag, andFalseotherwise.Concerning Areas:
The functions added in this PR only expose information from already-existing structures, and does not affect existing code nor does it implement any new systems or structures. The only function that may require maintenance is
get_item_type_states(), when new states are implemented (like those added in 2.2 related to scrolling).