SlideShare a Scribd company logo
1 of 34
Download to read offline
API-First Design
and Django
The tale of caring for your fellow developer
Olá! 🇧🇷
I am Klaus Laube
In ❤ with Django since version 0.96
Back-end developer at Son of a Tailor
klauslaube.com.br
github.com/kplaube
What’s an API again?
“(...) a set of dedicated URLs that return pure
data responses — meaning the responses
won’t contain the kind of presentational
overhead that you would expect in a
graphical user interface like a website.
Petr Gazarov
https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/
Let's build a
product! 🚀
The Code-First approach
Install Django
It’s not up to decision
picking a different
framework ❤
The Code-First approach
Install Django
It’s not up to decision
picking a different
framework ❤
Design the
database
Come up with
diagrams, define the
indexes, describe
relationships 💾
The Code-First approach
Install Django
It’s not up to decision
picking a different
framework ❤
Design the
database
Come up with
diagrams, define the
indexes, describe
relationships 💾
Write the code
Organize the packages,
do some TDD, write the
models, the views,
perhaps some API 👨‍💻
The Code-First approach
Install Django
It’s not up to decision
picking a different
framework ❤
Design the
database
Come up with
diagrams, define the
indexes, describe
relationships 💾
Write the code
Organize the packages,
do some TDD, write the
models, the views,
perhaps some API 👨‍💻
Deploy &
release
Deal with CI, CD, PaaS,
provisioning,
monitoring, caching,
etc 🖥
The Code-First approach
Install Django
It’s not up to decision
picking a different
framework ❤
Design the
database
Come up with
diagrams, define the
indexes, describe
relationships 💾
Write the code
Organize the packages,
do some TDD, write the
models, the views,
perhaps some API 👨‍💻
Expose
Let other stakeholders
know about your
release 🎉
☝
Here is where we’ll
start to integrate with
other developers
Deploy &
release
Deal with CI, CD, PaaS,
provisioning,
monitoring, caching,
etc 🖥
“Today Django is arguably used more often as
just a back-end API rather than a full
monolithic website solution at large
companies!
William S. Vincent
Django for APIs
What’s API-First?
“(...) the first, most waterfall aspect of
application development is the design of the
API’s.
Casey Lutz
https://medium.com/trimble-maps-engineering-blog/api-first-development-and-openapi-83
5afb46b7f1
3 principles of
API-First Design
#1
Your API is the first user interface of your application
#2
Your API comes first, then the implementation
#3
Your API is described (and maybe even self-descriptive)
It’s about caring for other
developers! 👨‍💻 👩‍💻
How can we do
that with
Django? 🤔
Design the API
Understand the
requirements, know your
stakeholders, set standards,
start defining behaviours.
API Blueprint example 👉
20
Validate
Get stakeholders involved,
think about use cases,
validate ideas through mock
servers, and get an
agreement.
Or you can use Prism:
https://stoplight.io/open-source/pris
m/
21
Test! Test! Test!
https://dredd.org
Implement
It’s time for some coding.
And it’s not just you! With a
solid contract your
stakeholders can start the
development as well.
Django REST Framework example 👉
23
What about {over,under}-fetching?
https://github.com/rsinger86/drf-flex-fields
Or consider
GraphQL 🤷‍♂
It’s official!
It’s time to turn the
agreement into a
specification.
rest_framework (with
uritemplate and pyyaml) is
enough to do this job.
26
$ python manage.py generateschema >
openapi-schema.yml
How to deal with changes?
▷ Path: mytodoapp.com/v1/tasks
▷ Querystring: mytodoapp.com/tasks?version=1.0
▷ Host: v1.mytodoapp.com/tasks
▷ Accept header: Accept: application/json; version=1.0
▷ Custom header: X-API-VERSION
▷ No versioning at all 🙃
https://www.django-rest-framework.org/api-guide/versioning/
Release
Turn the specification public.
Publish the API
documentation. drf-yasg is
your sidekick here.
Engage
Promote your API, start
monitoring, collect feedback,
and learn from your mistakes
and successes.
29
Repeat ♻
Further readings:
API-First Processes
and Tools
bit.ly/api-first-article
31
Further readings:
How To Design
Great APIs With
API-First Design
bit.ly/3hQYw7d
32
Further readings:
Django for APIs
leanpub.com/djangoforapis
33
Tak! 🇩🇰
You can find me at:
klauslaube.com.br
github.com/kplaube
Django Forum: kplaube

More Related Content

What's hot

JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...Simplilearn
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaEdureka!
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testingHadi Fadlallah
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Ankit Prajapati
 
Test Automation
Test AutomationTest Automation
Test Automationrockoder
 
The Problem Tracking System
The Problem Tracking SystemThe Problem Tracking System
The Problem Tracking SystemSonali Chawla
 
2.6.12. microbiological examination of non sterile products (total viable aer...
2.6.12. microbiological examination of non sterile products (total viable aer...2.6.12. microbiological examination of non sterile products (total viable aer...
2.6.12. microbiological examination of non sterile products (total viable aer...Guide_Consulting
 
How Do You Build Software? Software Engineering Practices of an Agile Developer
How Do You Build Software? Software Engineering Practices of an Agile DeveloperHow Do You Build Software? Software Engineering Practices of an Agile Developer
How Do You Build Software? Software Engineering Practices of an Agile DeveloperLemi Orhan Ergin
 
Software Engineering - Basics
Software Engineering - BasicsSoftware Engineering - Basics
Software Engineering - BasicsPurvik Rana
 
Software Testing Tools | Edureka
Software Testing Tools | EdurekaSoftware Testing Tools | Edureka
Software Testing Tools | EdurekaEdureka!
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing StrategiesAlpana Bhaskar
 
Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextElisabeth Hendrickson
 

What's hot (20)

Operating System lab
Operating System labOperating System lab
Operating System lab
 
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
JMeter Load Testing | Load Testing Using JMmeter | JMeter Tutorial For Beginn...
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | Edureka
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Test automation process
Test automation processTest automation process
Test automation process
 
System testing
System testingSystem testing
System testing
 
Software testing
Software testingSoftware testing
Software testing
 
Manual testing
Manual testingManual testing
Manual testing
 
Software metrics
Software metricsSoftware metrics
Software metrics
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
Test Automation
Test AutomationTest Automation
Test Automation
 
The Problem Tracking System
The Problem Tracking SystemThe Problem Tracking System
The Problem Tracking System
 
2.6.12. microbiological examination of non sterile products (total viable aer...
2.6.12. microbiological examination of non sterile products (total viable aer...2.6.12. microbiological examination of non sterile products (total viable aer...
2.6.12. microbiological examination of non sterile products (total viable aer...
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
How Do You Build Software? Software Engineering Practices of an Agile Developer
How Do You Build Software? Software Engineering Practices of an Agile DeveloperHow Do You Build Software? Software Engineering Practices of an Agile Developer
How Do You Build Software? Software Engineering Practices of an Agile Developer
 
Software Engineering - Basics
Software Engineering - BasicsSoftware Engineering - Basics
Software Engineering - Basics
 
Software Testing Tools | Edureka
Software Testing Tools | EdurekaSoftware Testing Tools | Edureka
Software Testing Tools | Edureka
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Presentation v3
Presentation v3Presentation v3
Presentation v3
 
Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile Context
 

Similar to API-First Design and Django

Rest apis with DRF
Rest apis with DRFRest apis with DRF
Rest apis with DRFDharmit Shah
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsAxway
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersRosario Renga
 
Space Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfSpace Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfPostman
 
Concepts and applications of Django.pptx
Concepts and applications of Django.pptxConcepts and applications of Django.pptx
Concepts and applications of Django.pptxsushmitjivtode4
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers LoveJamison K. Bell | OvenPOP 360
 
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...apidays
 
General Terminologies to understand programming and Data Science
General Terminologies to understand programming and Data ScienceGeneral Terminologies to understand programming and Data Science
General Terminologies to understand programming and Data Sciencepujashri1975
 
Dev Learn Handout - Session 604
Dev Learn Handout - Session 604Dev Learn Handout - Session 604
Dev Learn Handout - Session 604Chad Udell
 
Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersMars Devs
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first classLibbySchulze
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?Kasra Khosravi
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Djangojeff_croft
 
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en AzureGapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en AzureAlberto Diaz Martin
 
Top 10 web development tools in 2022
Top 10 web development tools in 2022Top 10 web development tools in 2022
Top 10 web development tools in 2022intouchgroup2
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
10 Best Web Development Frameworks for Your Business Needs
10 Best Web Development Frameworks for Your Business Needs10 Best Web Development Frameworks for Your Business Needs
10 Best Web Development Frameworks for Your Business NeedsSofiaCarter4
 

Similar to API-First Design and Django (20)

Rest apis with DRF
Rest apis with DRFRest apis with DRF
Rest apis with DRF
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
 
Space Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfSpace Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdf
 
Concepts and applications of Django.pptx
Concepts and applications of Django.pptxConcepts and applications of Django.pptx
Concepts and applications of Django.pptx
 
Django in the Real World
Django in the Real WorldDjango in the Real World
Django in the Real World
 
Web API Design
Web API DesignWeb API Design
Web API Design
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
 
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
 
General Terminologies to understand programming and Data Science
General Terminologies to understand programming and Data ScienceGeneral Terminologies to understand programming and Data Science
General Terminologies to understand programming and Data Science
 
Dev Learn Handout - Session 604
Dev Learn Handout - Session 604Dev Learn Handout - Session 604
Dev Learn Handout - Session 604
 
Learn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for DevelopersLearn Django Tips, Tricks & Techniques for Developers
Learn Django Tips, Tricks & Techniques for Developers
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first class
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Django
 
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en AzureGapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
 
Top 10 web development tools in 2022
Top 10 web development tools in 2022Top 10 web development tools in 2022
Top 10 web development tools in 2022
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
10 Best Web Development Frameworks for Your Business Needs
10 Best Web Development Frameworks for Your Business Needs10 Best Web Development Frameworks for Your Business Needs
10 Best Web Development Frameworks for Your Business Needs
 

Recently uploaded

( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...nilamkumrai
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceEscorts Call Girls
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...nilamkumrai
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 

Recently uploaded (20)

( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 

API-First Design and Django

  • 1. API-First Design and Django The tale of caring for your fellow developer
  • 2. Olá! 🇧🇷 I am Klaus Laube In ❤ with Django since version 0.96 Back-end developer at Son of a Tailor klauslaube.com.br github.com/kplaube
  • 4. “(...) a set of dedicated URLs that return pure data responses — meaning the responses won’t contain the kind of presentational overhead that you would expect in a graphical user interface like a website. Petr Gazarov https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/
  • 6. The Code-First approach Install Django It’s not up to decision picking a different framework ❤
  • 7. The Code-First approach Install Django It’s not up to decision picking a different framework ❤ Design the database Come up with diagrams, define the indexes, describe relationships 💾
  • 8. The Code-First approach Install Django It’s not up to decision picking a different framework ❤ Design the database Come up with diagrams, define the indexes, describe relationships 💾 Write the code Organize the packages, do some TDD, write the models, the views, perhaps some API 👨‍💻
  • 9. The Code-First approach Install Django It’s not up to decision picking a different framework ❤ Design the database Come up with diagrams, define the indexes, describe relationships 💾 Write the code Organize the packages, do some TDD, write the models, the views, perhaps some API 👨‍💻 Deploy & release Deal with CI, CD, PaaS, provisioning, monitoring, caching, etc 🖥
  • 10. The Code-First approach Install Django It’s not up to decision picking a different framework ❤ Design the database Come up with diagrams, define the indexes, describe relationships 💾 Write the code Organize the packages, do some TDD, write the models, the views, perhaps some API 👨‍💻 Expose Let other stakeholders know about your release 🎉 ☝ Here is where we’ll start to integrate with other developers Deploy & release Deal with CI, CD, PaaS, provisioning, monitoring, caching, etc 🖥
  • 11. “Today Django is arguably used more often as just a back-end API rather than a full monolithic website solution at large companies! William S. Vincent Django for APIs
  • 13. “(...) the first, most waterfall aspect of application development is the design of the API’s. Casey Lutz https://medium.com/trimble-maps-engineering-blog/api-first-development-and-openapi-83 5afb46b7f1
  • 15. #1 Your API is the first user interface of your application
  • 16. #2 Your API comes first, then the implementation
  • 17. #3 Your API is described (and maybe even self-descriptive)
  • 18. It’s about caring for other developers! 👨‍💻 👩‍💻
  • 19. How can we do that with Django? 🤔
  • 20. Design the API Understand the requirements, know your stakeholders, set standards, start defining behaviours. API Blueprint example 👉 20
  • 21. Validate Get stakeholders involved, think about use cases, validate ideas through mock servers, and get an agreement. Or you can use Prism: https://stoplight.io/open-source/pris m/ 21
  • 23. Implement It’s time for some coding. And it’s not just you! With a solid contract your stakeholders can start the development as well. Django REST Framework example 👉 23
  • 26. It’s official! It’s time to turn the agreement into a specification. rest_framework (with uritemplate and pyyaml) is enough to do this job. 26 $ python manage.py generateschema > openapi-schema.yml
  • 27. How to deal with changes? ▷ Path: mytodoapp.com/v1/tasks ▷ Querystring: mytodoapp.com/tasks?version=1.0 ▷ Host: v1.mytodoapp.com/tasks ▷ Accept header: Accept: application/json; version=1.0 ▷ Custom header: X-API-VERSION ▷ No versioning at all 🙃 https://www.django-rest-framework.org/api-guide/versioning/
  • 28. Release Turn the specification public. Publish the API documentation. drf-yasg is your sidekick here.
  • 29. Engage Promote your API, start monitoring, collect feedback, and learn from your mistakes and successes. 29
  • 31. Further readings: API-First Processes and Tools bit.ly/api-first-article 31
  • 32. Further readings: How To Design Great APIs With API-First Design bit.ly/3hQYw7d 32
  • 33. Further readings: Django for APIs leanpub.com/djangoforapis 33
  • 34. Tak! 🇩🇰 You can find me at: klauslaube.com.br github.com/kplaube Django Forum: kplaube