Package: contentstack-utils
Contentstack UtilityThis guide will help you get started with Contentstack Python Utils SDK to build apps powered by Contentstack.PrerequisitesThe latest version ofPyCharmorVisual Studio CodePython 3Create virtual environmentActivate virtual environmentSDK Installation and SetupTo set up Python Utils SDK, Go to terminal and locate the virtual environment path and type below.pipinstallcontentstack_utilsIf you are using Contentstack Python SDK in your project by running the following commands,  then “contentstack_utils”  is already imported into your project.For the latest versionpipinstallContentstackFor the specific versionpipinstallContentstack==1.5.1UsageLet’s learn how you can use Utils SDK to render embedded items.Create Render OptionTo render embedded items on the front-end, use the renderContents function, and define the UI elements you want to show in the front-end of your website, as shown in the example code below:fromcontentstack_utils.utilsimportUtilsfromcontentstack_utils.render.optionsimportOptionsjson_array={}# should be type of dictionary or listoption=Options()response=Utils.render_content('html_string',json_array,option)print(response)Basic QueriesContentstack Utils SDK lets you interact with the Content Delivery APIs and retrieve embedded items from the RTE field of an entry.Fetch Embedded Item(s) from a Single EntryTo get an embedded item of a single entry, you need to provide the stack API key, environment name, content type’s UID, and entry’s UID. Then, use theentry.fetchfunction as shown below:importcontentstackstack=contentstack.Stack('api_key','delivery_token','environment')content_type=stack.content_type("content_type_uid")entry=content_type.entry("entry_uid")result=entry.fetch()ifresultisnotNone:entry=result['entries']Utils.render(entry,['rich_text_editor','some_other_text'],Option())Fetch Embedded Item(s) from Multiple EntriesTo get embedded items from multiple entries, you need to provide the stack API key, delivery token, environment name, and content type’s UID.importcontentstackstack=contentstack.Stack('api_key','delivery_token','environment')query=stack.content_type("content_type_uid").query()result=query.find()ifresultisnotNoneand'entries'inresult:entry=result['entries']foriteminrange:option=Option()Utils.render(item,['rich_text_editor','some_other_text'],option)SuperchargedTo get supercharged items from multiple entries, you need to provide the stack API key, delivery token, environment name, and content type’s UID.importcontentstackstack=contentstack.Stack('api_key','delivery_token','environment')query=stack.content_type("content_type_uid").query()result=query.find()ifresultisnotNoneand'entries'inresult:entry=result['entries']foriteminentry:option=Option()Utils.json_to_html(item,['paragraph_text'],option)GraphQL SRTETo get supercharged items from multiple entries, you need to provide the stack API key, delivery token, environment name, and content type’s UID.importcontentstackstack=contentstack.Stack('api_key','delivery_token','environment')query=stack.content_type("content_type_uid").query()result=query.find()ifresultisnotNoneand'entries'inresult:entry=result['entries']foriteminentry:option=Option()GQL.json_to_html(item,['paragraph_text'],option)