Thursday 11:30 AM–12:10 PM in Radio City (#6604)

Contract testing in Python for a data science API

J. Scott Hajek

Audience level:


The reliability of a data science API for external consumption depends on a good contract, meaning a clearly-communicated definition of a proper request and a proper response. This talk is for those who may have some experience or familiarity with creating simple RESTful APIs but want to know how to create robust tests for them.


Verifying input and ensuring your response is well-formed is crucial. Learn how jsonschema was used in a balanced team with data scientists and application developers to define the shape and properties of input/output that should be considered valid. This enabled test-driven development and allowed the data scientists and the consumers (i.e. the app developers) to work more independently while not breaking each other’s code. Devs happy, data scientists happy.

Subscribe to Receive PyData Updates