Application Programming Interfaces (APIs) Development using : Python, Django, Rest, Flask, PostgreSQL
What you will learn
☑ Setup Python Development Environment
☑ Setup Django Development Environment
☑ Setup Flask Development Environment
☑ Setup PostgreSQL Database
☑ Build an API with Python and Flask
☑ Build an API with Python , Django, PostgreSQL
☑ Test API Using Postman
Description
An API is a set of definitions and protocols for building and integrating application software. It’s sometimes referred to as a contract between an information provider and an information user—establishing the content required from the consumer (the call) and the content required by the producer (the response). For example, the API design for a weather service could specify that the user supply a zip code and that the producer reply with a 2-part answer, the first being the high temperature, and the second being the low.
In other words, if you want to interact with a computer or system to retrieve information or perform a function, an API helps you communicate what you want to that system so it can understand and fulfill the request.
You can think of an API as a mediator between the users or clients and the resources or web services they want to get. It’s also a way for an organization to share resources and information while maintaining security, control, and authentication—determining who gets access to what.
Another advantage of an API is that you don’t have to know the specifics of caching—how your resource is retrieved or where it comes from.
A REST API (also known as Restful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with Restful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.
REST is a set of architectural constraints, not a protocol or a standard. API developers can implement REST in a variety of ways.
When a client request is made via a Restful API, it transfers a representation of the state of the resource to the requester or endpoint. This information, or representation, is delivered in one of several formats via HTTP: JSON (JavaScript Object Notation), HTML, XLT, Python, PHP, or plain text. JSON is the most generally popular file format to use because, despite its name, it’s language-agnostic, as well as readable by both humans and machines.
Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general purpose language, meaning it can be used to create a variety of different programs and isn’t specialized for any specific problems. This versatility, along with its beginner-friendliness, has made it one of the most-used programming languages today.
Python, one of the most popular programming languages in the world, has created everything from Netflix’s recommendation algorithm to the software that controls self-driving cars. Python is a general-purpose language, which means it’s designed to be used in a range of applications, including data science, software and web development, automation, and generally getting stuff done.
Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It is free and open source, has a thriving and active community, great documentation, and many options for free and paid-for support.
Flask is a micro web framework written in Python. It is classified as a micro framework because it does not require particular tools or libraries.
PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features .
Postman is an application used for API testing. It is an HTTP client that tests HTTP requests, utilizing a graphical user interface, through which we obtain different types of responses that need to be subsequently validated.
English
Language
Content
Introduction
Introduction
What is an API
What is REST API
What is Python
What is Django
What is Flask
What is PostgreSQL
PostgreSQL Database Setup
Installing PostgreSQL on Windows
Installing PostgreSQL on Mac
Installing PostgreSQL on Linux
Installing PgAdmin Tool on MacOS
Installing PgAdmin Tool on Linux
Connecting to PostgreSQL Using PgAdmin Tool
Python Setup
Installing Python on Windows
Installing Python on Macs
Installing Python on Linux
What are Text Editors
installing Atom Text Editor
Installing Visual Studio Code
Create virtual environments on Windows
Create virtual environments on Macs
Create virtual environments on Linux
Activate virtual environment on Windows
Activate virtual environment on Macs
Activate virtual environment on Linux
Django Setup | API Development
Creating and activating a virtual environment
Installing Django
Installing Django REST framework
Installing Corsheaders
Create a new Django Project
Create a new Django App
Django App vs Django Project
Registering Django App
Django PostgreSQL Database Setup
Executing initial migration
Creating a Django Model
Creating and applying new migrations
Creating a serializer class
Starting and stopping Django Server
Creating a superuser account
Creating views – Part 1
Creating views – Part 2
Mapping views to URLS
Register Model with admin site
Creating Model Objects
Installing Postman
Testing API
Project Code
Flask Setup | API Development Environment
Creating and activating a virtual environment
Install Flask
Setup Flask Environment Variables
Install Flask-Restful
Creating and initializing a Python Module
What is a Python Dictionary
Creating a Python directory
Create a class and route
Add post method to class
Test API with GET & POST Methods
Creating a second class with methods
Testing API Using CRUD Operations
What is Http
What are Http Request Methods
What are Http Response Status Codes
API Source Code