building rest apis with django

20
Building REST APIs with Django Create your own self-describing and specification- compliant APIs in minutes.

Upload: byron-dover

Post on 14-Apr-2017

122 views

Category:

Software


6 download

TRANSCRIPT

Page 1: Building REST APIs with Django

Building REST APIs with DjangoCreate your own self-describing and specification-compliant APIs in minutes.

Page 2: Building REST APIs with Django

Keep in touch!

@byrondover

Page 3: Building REST APIs with Django

Four Technologies

1.Django2.Django Rest Framework3.JSON API Specification4.Swagger

Page 4: Building REST APIs with Django

Technology #1

Page 5: Building REST APIs with Django

Migrations

Page 6: Building REST APIs with Django

Using inspectdb

Page 7: Building REST APIs with Django

Technology #2

Page 8: Building REST APIs with Django

Django REST Framework

Page 9: Building REST APIs with Django

Django REST Framework

Page 10: Building REST APIs with Django

Technology #3

Page 11: Building REST APIs with Django

JSON API

Page 12: Building REST APIs with Django

JSON API

Page 13: Building REST APIs with Django

JSON API

Page 14: Building REST APIs with Django

SWAGGER

Technology #4

Page 15: Building REST APIs with Django

Swagger Request

Self-describing.

Self-documenting.

Programmatically accessible. GET /api-docs?format=openapi HTTP/1.1

Page 16: Building REST APIs with Django

Swagger Response

Human-readable.

Machine-readable.

Precisely describes your API contract.

Page 17: Building REST APIs with Django

Putting it all together...

Page 18: Building REST APIs with Django

inspectdb (Django)

+

Django Rest Framework (djangorestframework)+

JSON API Specification (djangorestframework-jsonapi)

+

Swagger Schema (django-rest-swagger)

=

Automatic idiomatically RESTful APIs for all your data.

Page 19: Building REST APIs with Django

Stop! Demo Time

Page 20: Building REST APIs with Django

Questions?

References

http://dev.mysql.com/doc/index-other.html

http://www.django-rest-framework.org

https://www.djangoproject.com

https://github.com/byrondover/ladjango-demo

https://github.com/django-json-api/django-rest-framework-json-api

https://github.com/marcgibbons/django-rest-swagger