Skip to content

pyrig-resources Documentation

DependencyAuditor SecurityChecker

CI CD

MarkdownLinter PythonLinter TypeChecker VersionControlHookManager

CoverageTester ProjectTester

PackageManager Pyrigger RemoteVersionController VersionController

DocsBuilder Documentation

PackageIndex ProgrammingLanguage License


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 by pyrig 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 (as ResourcesInitConfigFile) to declare the rig/resources/ package. pyrig's cross-package subclass discovery finds this config during mkroot, 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 own resources package.