resource¶
Convenience function for accessing packaged resource like so:
resource('package.module', 'resource.file')
- render_static.resource.resource(package, filename)[source]¶
Open a packaged resource as a file.
- Parameters:
package (str | ModuleType) – the package as either an imported module, or a string
filename (str) – the filename of the resource to include.
- Returns:
New instance of
_Resource.- Return type: