bolt
bolt copied to clipboard
feat: `bolt.contrib.resource_generator`
ResourceGenerator is a sugar-y wrapper around ctx.generate.
I think the _generator field is fine, but it might be alright to just have a generator or generate field or property without the _. If there's a name collision, the __getitem__ bypass always exist.
This idea is separate and perhaps complimentary to the ~ idea. The __call__ stuff was removed since it references bolt-expressions, we can add our own contrib that inherits this ResourceGenerator and adds the __call__ sugar!