I should add that I'm not married to Colander either, if people have had
good experiences with Marshmallow-Sqlalchemy, I could very well switch to
that.

thanks!

On Tue, Jun 7, 2016 at 9:17 AM, Iain Duncan <iainduncanli...@gmail.com>
wrote:

> Hi folks, I'm working on an internal framework using Pyramid, Colander,
> and SQLAlchemy, and it's for much more enterprisey apps than I have
> previously done. We're looking at having a full fledged service layer, and
> using the ZCA as a DI framework a fair bit. I'm hoping folks can share
> their opinions on what they've found the best place and way to convert from
> validated dicts (originating from JSON from angular.js) to SA mapped
> objects is. I'm using Colander to validate the incoming json, which might
> be nested two or three levels deep, so after Colander conversion I know the
> fields in the dicts are ok, but they are still just python dicts.
>
> In the past, I used formencode to do both validation and conversion, but
> in this case I'm hoping to keep SQLA logic and coupling to a business/model
> layer that is more insulated from the web request layer so it can be used
> without issue from non-web-request contexts (rabbitqm jobs, scripts, etc).
> So I'm imagining right now that outside this business/model layer the web
> controllers are dealing with json and validating with colander, inside the
> business/model we are dealing with either proxy objects to the model
> objects or direct model objects, and somewhere (?) we convert.
>
> Any suggestions on what people have found to be good strategies or tools
> (or reading!) for localizing and controlling the conversion from dicts to
> mapped objects with relationships would be much appreciated. Or suggestions
> that I'm just wrong and why.
>
> thanks,
> Iain
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to