~/talk

Auto-generating an API using PostgreSQL, Django, and Django REST Framework

Talkat DjangoCon US 2018 · 2018-10-14..10-19· [django, databases]
slides:none on file

Auto-generating an API from PostgreSQL with Django and Django REST Framework uses information_schema introspection to inspect schemas, meta-programming to do meta-programming model generation that creates Django models/serializers/filtersets/viewsets, and a dbt added PK trick to satisfy Django primary key requirements. Performance fixes include a conditional count pagination to avoid slow COUNTs on millions of rows. The system runs in production for years serving hundreds to thousands of tables, but struggles with PostGIS types, rich foreign‑key relationships, and rapidly changing client‑visible schemas.

AI-written summary · about

  1. 0:00Start
  2. 11:18Inspecting the Database
  3. 11:29Introspection
  4. 12:05Information Schema
  5. 18:33Introduction to Meta Programming
  6. 20:35Meta Programming
  7. 24:23Primary Keys
  8. 27:49Django Filters
  9. 29:35View Sets
  10. 30:46Browsable Api
  11. 32:29Meta Classes
  12. 33:31Permissions
  13. 34:00Django Rest Frameworks Permission
  14. 35:29Pagination
  15. 36:30Pagination Class
  16. 37:57Custom Paginator
~/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.