I enjoy using validictory for using Jsonschema with Python https://pypi.python.org/pypi/validictory.
Sent from my iPhone > On Aug 28, 2015, at 11:29 AM, Jay Pipes <jaypi...@gmail.com> wrote: > >> On 08/28/2015 07:22 AM, Chris Dent wrote: >> >> This morning I kicked off a quick spec for replacing WSME in >> Ceilometer with ... something: >> >> https://review.openstack.org/#/c/218155/ >> >> This is because not only is WSME not that great, it also results in >> controller code that is inscrutable. >> >> The problem with the spec is that it doesn't know what to replace >> WSME with. >> >> So, for your Friday afternoon pleasure I invite anyone with an >> opinion to hold forth on what framework they would choose. The spec >> lists a few options but please feel to not limit yourself to those. >> >> If you just want to shoot the breeze please respond here. If you >> have specific comments on the spec please response there. > > I'm not going to get into another discussion about what WSGI/routing > framework to use (go Falcon! ;) ). But, since you are asking specifically > about *validation* of request input, I'd like to suggest just using plain ol' > JSONSchema, and exposing the JSONSchema documents in a GET > /schemas/{object_type} resource endpoint. > > voluptuous may be more Pythonic, as Julien mentioned, but the problem is you > can't expose the validation schema to the end user via any standard document > format (like JSONSchema). Using the jsonschema library along with standard > JSONSchema documents allows the API to publish its expected request and > response schemas to the end user, allowing, for example, a client library to > pull the schema documents and utilize a JSONSchema parsing/validation library > locally to pre-validate data before ever sending it over the wire. > > Best, > -jay > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev