~/talk

Contract Testing in Python for a Data Science API

Talkat PyData NYC 2018 · 2018-10-11..10-12· [testing]
links:none on file
slides:none on file

Demo of using JSON Schema as a formal contract for a Python-backed REST microservice, showing concrete tests that validate request and response shape rather than brittle exact values. Shows tooling: generating schemas with quicktype, validating with jsonschema.validate in pytest, enumerating all validation errors to produce precise 4xx messages, and deploying a Flask service on Cloud Foundry. Promises examples, sample code, and CI-friendly patterns for swapping implementations and A/B testing.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46API collaboration challenge
  3. 3:49RESTful API design
  4. 5:40API contracts matter
  5. 8:27Self-describing data formats
  6. 9:54Need for contract testing
  7. 12:23JSON Schema solution
  8. 13:05JSON Schema basics
  9. 16:17Generating JSON Schema
  10. 18:26JSON Schema validation
  11. 19:52Contract testing benefits
  12. 21:59Error messages with JSON Schema
  13. 22:41Recap
  14. 24:26Separation of concerns
  15. 25:55JSON Schema advantages
  16. 27:21Swagger integration
  17. 28:05Cloud Foundry deployment
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.