How to use Swagger with Python based Django REST APIs

Here in this tutorial I am going to show you how to use Swagger API with Django REST framework. Swagger API provides well structured documentation for REST API endpoints so a new person can say how to test a REST API without knowing its internal implementation. Essentially, Swagger does a simple but very powerful thing: with a bit of additional…

Python Django MySQL REST API CRUD Example

Introduction In this tutorial I am going to show you how to build CRUD operations on REST APIs using Python based Django framework and MySQL as a persistent repository. CRUD is an acronym that basically means Create Read Update Delete. So we are going to create new resource, update existing resource, delete existing resource and retrieve or fetch existing resource.

How to setup Python based Django framework and MySQL Databse to execute SQL statements

Introduction Here in this tutorial I am going to show you how to setup Python based Django framework and MySQL database server to execute SQL statement in Windows environment. The MySQL server is used as a persistent system for storing data for the application. I have already discussed in my another tutorial how to setup Django, so I won’t repeat…

How To Setup Python Based Django Framework In Windows

Django In this example I am going to show you how to configure Python based Django in Windows Operating System. The current version of Django, at the time of writing, I am using here is 3.0.8 and later updated to version 4.2.5. Here I am going to show you how to install latest version of Django in Windows 64 bit…

Autocomplete Input Suggestion using Python and Flask

Introduction Autocomplete is a feature in which an application predicts the rest of a word a user is typing. In graphical user interfaces, users can typically press the tab key to accept a suggestion or the down arrow key to accept one of several. Autocomplete speeds up human-computer interactions when it correctly predicts the word a user intends to enter…

Upload and Display Multiple Images using Python and Flask

Introduction Here I am going to show you how to upload multiple images and display them one by one once images get uploaded using Python programming language. I am using here Flask as a web based framework on top of Python language. On the UI (User Interface) there is an input field which is used to select multiple files. To…

Python Client for Apache Kafka Producer and Consumer

Introduction In this tutorial I am going to show you how to use Python client to work with Apache kafka distributed stream processing system. I will create Kafka producer and consumer examples using Python language. KafkaConsumer is a high-level message consumer that consumes records from a kafka cluster. The consumer is not thread safe and should not be shared across…

Convert PDF File Text to Audio Speech using Python and Google gTTS API

Introduction We are going to show you how to extract text from PDF file and convert them into audio speech using Google gTTS API. gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate’s text-to-speech API. Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout.

Extract Text from PDF File using Python

Introduction We will create an example using Python programming language how to extract text from PDF file. In this example we are going to use PyPDF2 package from Python to work with PDF file.

How to insert CSV data into MySQL database using Python in different ways

Introduction This example will show you how to insert CSV data into MySQL database table directly. So I am going to create insert SQL statement for inserting data individually or I will also load the csv data directly into the MySQL table. CSV means Comma Separated Value, so it’s a plain text data. Each line of the file is data…