--- title: "system.config.getResource" description: "Returns a single resource." --- # system.config.getResource > Returns a single resource. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.config.getResource(*moduleId, typeId, name, collection)` :::tip An asterisk indicates that **all** parameters following it are expecting keywords when the function is being called in your script. This means that, when using an asterisk-marked parameter, **both** the parameter and argument **must** be specified. For example, `moduleId="ignition"`. ::: ### Parameters | Type | Parameter | Description | |---|---|---| | String | *moduleId | The module ID portion of the resource type identifier. | | String | *typeId | The type ID portion of the resource type identifier. | | String | *name | The name of the resource. Required for [named](platform\gateway\web-interface\platform\gateway-deployment-modes\gateway-deployment-modes.md#named-resources) resources, but must be omitted for [singleton](platform\gateway\web-interface\platform\gateway-deployment-modes\gateway-deployment-modes.md#singleton-resources) resources. | | String | *collection | The [collection](platform\gateway\web-interface\platform\gateway-deployment-modes\gateway-deployment-modes.md#collections) containing the resource. If omitted, uses the active definition. | ### Returns **PyResource** - The specified Gateway resource, as a PyResource that can be read as plain Python properties. ### Scope Gateway ## Code Examples ```python title="Code Snippet" # This example retrieves a database connection resource and prints the resource's signature to a label on the same view. moduleId = "ignition" typeId = "database-connection" name = "MySQL" # Call the getResource() function myResource = system.config.getResource(moduleId=moduleId, typeId=typeId, name=name) # Get the resource signature and print it to a Label signature = myResource.signature self.getSibling("Label").props.text = signature ```