Closed OriHoch closed 5 years ago
This could be easily implemented as a wrapper function:
def with_schema(generator, schema):
def func(package):
descriptor = dict(name='gen', path='gen.csv', schema=schema)
package.pkg.add_resource(descriptor)
yield package.pkg
yield from package
yield generator
return func
(didn't run this, so some tweaking might be necessary)
I think this will be useful