This course will teach you how to build a professional API platform using pure Flask, without any supplemental libraries, so that students can learn the fundamentals of RESTful API design.
The course covers the basic concepts of the RESTful API pattern and then goes into detail and step by step building an API platform that will cover the six constraints of the architecture. Students will learn the industry-standard and will follow best practices for API architectures.
At the end of the course students will be able to design, architect and build their own RESTful API platforms, and with the deep understanding of the laws governing APIs, can go ahead and try out the API libraries available for Python and Flask, knowing the fundamentals and the advantages of using them.
If you already know the basics of Flask and you are interested in how to design, architect and build an API platform, this is the course for you.
The course is divided in 2 sections:
Introduction which covers all the concepts necessary to understand what is a RESTful API and its six constraints
A step by step explanation building a Pet Store API that will include an authentication layer, a Store endpoint and a Pet endpoint as well as search functionalities
The course has more than 5 hours of video tutorials as well as the source code at the end of each section, so that you can follow along with the coding process.
The course can take anywhere from 3 to 10 days to complete based on how much material the student completes daily.
Additionally we’re constantly updating the course, adding contents thanks to the feedback of our students.
Join this course and continue your path to becoming a professional backend web developer!
- What do we want to accomplish in this course?
- What do I need to have to complete this course?
What is an API?
What is REST?
Installing the Docker Client
- Docker client for Mac
- Docker compose
- Running the containers separately for pdb
- Using Flask pluggable views
- Explain Flask pluggable views - http://flask.pocoo.org/docs/0.11/views/
- Our first endpoint, /pets
- A simple GET pluggable view
Using Postman - https://www.getpostman.com/
A simple POST handler
Talk about HTTP Status Codes - http://www.restapitutorial.com/httpstatuscodes.html
- Build a GET individual pet endpoint
- Add location to all pets (HATEOAS)
Implement PUT, DELETE on pets
Explanation of the authentication design we are going to use
- Write a decorator to allow the user to access the API
- Add authentication to headers in Postman
Create the app registration endpoint and generator
Build the token-based application access decorator
Start a testing framework
- Build store models
- Don't expose MongoDB ID, use uuid
- Validation of data using jsonschema - http://python-jsonschema.readthedocs.io/en/latest/
- Great resource - https://spacetelescope.github.io/understanding-json-schema/index.html - to understanding it
Build JSON templates
Use Postman to test the Store end points
- PUT operations are the update of CRUD. It generally receives all the fields with the ones being updated changed.
- PATCH is used for updating only specific fields (we won't implement)
- Implement DELETE
- Results should always be paginate
- Links within show next and prev
- This is the HATEOAS of the app
- Testing CRUD
- Testing pagination
- Introduction to Fixtures
- Custom fixtures using mongoimport
- Create CRUD
- Postman Tests
- PUT and DELETE for Pets endpoint
- Write tests for Pets endpoint
- Pets pagination tests
- Use the same Store GET endpoint
Get all pets in a specific store using Postman
Search pets across stores
From Zero is an educational project created by Jorge Escobar, a technologist, entrepreneur and open source fanatic with more than 15 years of experience in the development of web applications in New York City.
Jorge has worked in well established companies like Yahoo!, Univision and MongoDB and has also been the technical founding member of various successful tech startups that have received multiple rounds of venture capital.
The biggest problem Jorge has experienced during his career is finding well rounded developers and he interviewed hundreds of them for positions in the teams he was leading. A constant pattern (no matter if candidates came from a good university or had a few years of experience) was the lack of practical, real world knowledge.
That’s why Jorge created From Zero, an educational project that would address those practical knowledge issues through training that builds hands-on experience and equip students with the tools required to be successful in today’s technology business needs.