pyrig-resources Documentation
A pyrig plugin that adds resources support.
What it does
Drop-in pyrig plugin that gives your project a conventional home for static resource files:
- Adds a
rig/resources/package to the target project, created and kept in place bypyrig mkroot.
No configuration required — installing the package as a development dependency is the whole setup. Then regenerate your pyrig configs as usual and the plugin's config file is picked up automatically.
Installation
uv add --group dev pyrig-resources
uv run pyrig mkroot
After running pyrig mkroot, the package lives at
src/<your_project>/rig/resources/, ready for your static files.
How it works
The plugin subclasses one pyrig base class:
InitConfigFile(asResourcesInitConfigFile) to declare therig/resources/package. pyrig's cross-package subclass discovery finds this config duringmkroot, resolves the source module's dotted name into your project's package tree, and writes the generated__init__.py— seeding it with the docstring of the plugin's ownresourcespackage.