klen / mixer

Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.
Other
939 stars 96 forks source link

support for object generation from marshmallow schema #54

Open jo-tham opened 8 years ago

jo-tham commented 8 years ago

Hi,

is there any interest in adding support for generating objects based on marshmallow schema?

https://github.com/marshmallow-code/marshmallow

I took a cursory look - very roughly, it seems a map of schema field types to generator types is needed. what else would be involved?

or perhaps it is practical to use the ORM backend and simply constrain the fields to those used in the marschmallow schema...

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31497859-support-for-object-generation-from-marshmallow-schema?utm_campaign=plugin&utm_content=tracker%2F327725&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F327725&utm_medium=issues&utm_source=github).
klen commented 8 years ago

Why not? But I've no time now. But a PR is very appreciated.

jo-tham commented 8 years ago

thanks @klen - I'm also chatting with factory_boy and marshmallow maintainers and considering a separate library that integrates generators with marshmallow.

glad to make a PR if I decide to go with mixer.

cheers