Automated software testing with Python
Last Updated :
24 May, 2024
Software testing is the process in which a developer ensures that the actual output of the software matches with the desired output by providing some test inputs to the software. Software testing is an important step because if performed properly, it can help the developer to find bugs in the software in very less amount of time. Software testing can be divided into two classes, Manual testing and Automated testing. Automated testing is the execution of your tests using a script instead of a human. In this article, we'll discuss some of the methods of automated software testing with Python. Let's write a simple application over which we will perform all the tests.
Python-based automation testing frameworks like pytest provide a structured and efficient way to write test cases, making test automation more manageable and scalable. When executed on cloud platforms like LambdaTest, these tests gain the advantage of running on diverse browsers and environments, enabling comprehensive cross-browser testing without the need for extensive local infrastructure.
LambdaTest is an AI-powered test orchestration and execution platform that lets developers and testers perform automated software testing using Python. The platform offers an online browser farm of real browsers and operating systems to run Python automated tests at scale on a cloud grid. Developers and testers can run test suites using popular testing frameworks like Selenium, Playwright, Cypress, Appium, and more.
Python
class Square:
def __init__(self, side):
""" creates a square having the given side
"""
self.side = side
def area(self):
""" returns area of the square
"""
return self.side**2
def perimeter(self):
""" returns perimeter of the square
"""
return 4 * self.side
def __repr__(self):
""" declares how a Square object should be printed
"""
s = 'Square with side = ' + str(self.side) + '\n' + \
'Area = ' + str(self.area()) + '\n' + \
'Perimeter = ' + str(self.perimeter())
return s
if __name__ == '__main__':
# read input from the user
side = int(input('enter the side length to create a Square: '))
# create a square with the provided side
square = Square(side)
# print the created square
print(square)
Note: For more information about the function __repr__(), refer this article. Now that we have our software ready, let's have a look at the directory structure of our project folder and after that, we'll start testing our software.
---Software_Testing
|--- __init__.py (to initialize the directory as python package)
|--- app.py (our software)
|--- tests (folder to keep all test files)
|--- __init__.py
The 'unittest' module
One of the major problems with manual testing is that it requires time and effort. In manual testing, we test the application over some input, if it fails, either we note it down or we debug the application for that particular test input, and then we repeat the process. With unittest, all the test inputs can be provided at once and then you can test your application. In the end, you get a detailed report with all the failed test cases clearly specified, if any. The unittest module has both a built-in testing framework and a test runner. A testing framework is a set of rules which must be followed while writing test cases, while a test runner is a tool which executes these tests with a bunch of settings, and collects the results. Installation: unittest is available at PyPI and can be installed with the following command -
pip install unittest
Use: We write the tests in a Python module (.py). To run our tests, we simply execute the test module using any IDE or terminal. Now, let's write some tests for our small software discussed above using the unittest module.
- Create a file named tests.py in the folder named "tests".
- In tests.py import unittest.
- Create a class named TestClass which inherits from the class unittest.TestCase. Rule 1: All the tests are written as the methods of a class, which must inherit from the class unittest.TestCase.
- Create a test method as shown below. Rule 2: Name of each and every test method should start with "test" otherwise it'll be skipped by the test runner.
Python
def test_area(self):
# testing the method Square.area().
sq = Square(2) # creates a Square of side 2 units.
# test if the area of the above square is 4 units,
# display an error message if it's not.
self.assertEqual(sq.area(), 4,
f'Area is shown {sq.area()} for side = {sq.side} units')
- Rule 3: We use special assertEqual() statements instead of the built-in assert statements available in Python. The first argument of assertEqual() is the actual output, the second argument is the desired output and the third argument is the error message which would be displayed in case the two values differ from each other (test fails).
- To run the tests we just defined, we need to call the method unittest.main(), add the following lines in the "tests.py" module.
Python
if __name__ == '__main__':
unittest.main()
- Because of these lines, as soon as you run execute the script "test.py", the function unittest.main() would be called and all the tests will be executed.
Finally the "tests.py" module should resemble the code given below.
Python
import unittest
from .. import app
class TestSum(unittest.TestCase):
def test_area(self):
sq = app.Square(2)
self.assertEqual(sq.area(), 4,
f'Area is shown {sq.area()} rather than 9')
if __name__ == '__main__':
unittest.main()
Having written our test cases let us now test our application for any bugs. To test your application you simply need to execute the test file "tests.py" using the command prompt or any IDE of your choice. The output should be something like this.
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
In the first line, a .(dot) represents a successful test while an 'F' would represent a failed test case. The OK message, in the end, tells us that all the tests were passed successfully. Let's add a few more tests in "tests.py" and retest our application.
Python
import unittest
from .. import app
class TestSum(unittest.TestCase):
def test_area(self):
sq = app.Square(2)
self.assertEqual(sq.area(), 4,
f'Area is shown {sq.area()} rather than 9')
def test_area_negative(self):
sq = app.Square(-3)
self.assertEqual(sq.area(), -1,
f'Area is shown {sq.area()} rather than -1')
def test_perimeter(self):
sq = app.Square(5)
self.assertEqual(sq.perimeter(), 20,
f'Perimeter is {sq.perimeter()} rather than 20')
def test_perimeter_negative(self):
sq = app.Square(-6)
self.assertEqual(sq.perimeter(), -1,
f'Perimeter is {sq.perimeter()} rather than -1')
if __name__ == '__main__':
unittest.main()
.F.F
======================================================================
FAIL: test_area_negative (__main__.TestSum)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests_unittest.py", line 11, in test_area_negative
self.assertEqual(sq.area(), -1, f'Area is shown {sq.area()} rather than -1 for negative side length')
AssertionError: 9 != -1 : Area is shown 9 rather than -1 for negative side length
======================================================================
FAIL: test_perimeter_negative (__main__.TestSum)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests_unittest.py", line 19, in test_perimeter_negative
self.assertEqual(sq.perimeter(), -1, f'Perimeter is {sq.perimeter()} rather than -1 for negative side length')
AssertionError: -24 != -1 : Perimeter is -24 rather than -1 for negative side length
----------------------------------------------------------------------
Ran 4 tests in 0.001s
FAILED (failures=2)
A few things to note in the above test report are -
- The first line represents that test 1 and test 3 executed successfully while test 2 and test 4 failed
- Each failed test case is described in the report, the first line of the description contains the name of the failed test case and the last line contains the error message we defined for that test case.
- At the end of the report you can see the number of failed tests, if no test fails the report will end with OK
Note: For further knowledge you can read the complete documentation of unittest.
The "nose2" module
The purpose of nose2 is to extend unittest to make testing easier. nose2 is compatible with tests written using the unittest testing framework and can be used as a replacement of the unittest test runner. Installation: nose2 can be installed from PyPI using the command,
pip install nose2
Use: nose2 does not have any testing framework and is merely a test runner which is compatible with the unittest testing framework. Therefore we'll the run same tests we wrote above (for unittest) using nose2. To run the tests we use the following command in the project source directory ("Software_Testing" in our case),
nose2
In nose2 terminology all the python modules (.py) with name starting from "test" (i.e. test_file.py, test_1.py) are considered as test files. On execution, nose2 will look for all test files in all the sub-directories which lie under one or more of the following categories,
- which are python packages (contain "__init__.py").
- whose name starts with "test" after being lowercased, i.e. TestFiles, tests.
- which are named either "src" or "lib".
nose2 first loads all the test files present in the project and then the tests are executed. Thus, with nose2 we get the freedom to split our tests among various test files in different folders and execute them at once, which is very useful when dealing with large number of tests. Let's now learn about different customisation options provided by nose2 which can help us during the testing process.
- Changing the search directory - If we want to change the directory in which nose2 searches for test files, we can do that using the command line arguments -s or --start-dir as,
nose2 -s DIR_ADD DIR_NAME
- here, DIR_NAME is the directory in which we want to search for the test files and, DIR_ADD is the address of the parent directory of DIR_NAME relative to the project source directory (i.e. use "./" if test directory is in the project source directory itself). This is extremely useful when you want to test only one feature of your application at a time.
- Running specific test cases - Using nose2 we can also run a specific test at a time by using the command line arguments -s and --start-dir as,
nose2 -s DIR_ADD DIR_NAME.TEST_FILE.TEST_CLASS.TEST_NAME
- TEST_NAME: name of the test method.
- TEST_CLASS: class in which the test method is defined.
- TEST_FILE: name of the test file in which the test case is defined i.e. test.py.
- DIR_NAME: directory in which the test file exists.
- DIR_ADD: address of the parent directory of DIR_NAME relative to the project source.
- Running tests in a single module - nose2 can also be used like unittest by calling the function nose2.main() just like we called unittest.main() in previous examples.
The "pytest" module
pytest is the most popular testing framework for python. Using pytest you can test anything from basic python scripts to databases, APIs and UIs. Though pytest is mainly used for API testing, in this article we'll cover only the basics of pytest. Installation: You can install pytest from PyPI using the command,
pip install pytest
Use: The pytest test runner is called using the following command in project source,
py.test
Unlike nose2, pytest looks for test files in all the locations inside the project directory. Any file with name starting with "test_" or ending with "_test" is considered a test file in the pytest terminology. Let's create a file "test_file1.py" in the folder "tests" as our test file. Creating test methods: pytest supports the test methods written in the unittest framework, but the pytest framework provides easier syntax to write tests. See the code below to understand the test method syntax of the pytest framework.
Python
from .. import app
def test_file1_area():
sq = app.Square(2)
assert sq.area() == 4,
f"area for side {sq.side} units is {sq.area()}"
def test_file1_perimeter():
sq = app.Square(-1)
assert sq.perimeter() == -1,
f'perimeter is shown {sq.perimeter()} rather than -1'
Note: similar to unittest, pytest requires all test names to start with "test". Unlike unittest, pytest uses the default python assert statements which make it further easier to use. Note that, now the "tests" folder contains two files namely, "tests.py" (written in unittest framework) and "test_file1.py" (written in pytest framework). Now let's run the pytest test runner.
py.test
You'll get a similar report as obtained by using unittest.
============================= test session starts ==============================
platform linux -- Python 3.6.7, pytest-4.4.1, py-1.8.0, pluggy-0.9.0
rootdir: /home/manthan/articles/Software_testing_in_Python
collected 6 items
tests/test_file1.py .F [ 33%]
tests/test_file2.py .F.F [100%]
=================================== FAILURES ===================================
The percentages on the right side of the report show the percentage of tests that have been completed at that moment, i.e. 2 out of the 6 test cases were completed at the end of the "test_file1.py". Here are a few more basic customisations that come with pytest.
- Running specific test files: To run only a specific test file, use the command,
py.test <filename>
- Substring matching: Suppose we want to test only the area() method of our Square class, we can do this using substring matching as follows,
py.test -k "area"
- With this command pytest will execute only those tests which have the string "area" in their names, i.e. "test_file1_area()", "test_area()" etc.
- Marking: As a substitute to substring matching, marking is another method using which we can run a specific set of tests. In this method we put a mark on the tests we want to run. Observe the code example given below,
Python
# @pytest.mark.<tag_name>
@pytest.mark.area
def test_file1_area():
sq = app.Square(2)
assert sq.area() == 4,
f"area for side {sq.side} units is {sq.area()}"
- In the above code example test_file1_area() is marked with tag "area". All the test methods which have been marked with some tag can be executed by using the command,
py.test -m <tag_name>
- Parallel Processing: If you have a large number of tests then pytest can be customised to run these test methods in parallel. For that you need to install pytest-xdist which can be installed using the command,
pip install pytest-xdist
- Now you can use the following command to execute your tests faster using multiprocessing,
py.test -n 4
- With this command pytest assigns 4 workers to perform the tests in parallel, you can change this number as per your needs. If your tests are thread-safe, you can also use multithreading to speed up the testing process. For that you need to install pytest-parallel (using pip). To run your tests in multithreading use the command,
pytest --workers 4
Similar Reads
Python Projects - Beginner to Advanced Python is one of the most popular programming languages due to its simplicity, versatility, and supportive community. Whether youâre a beginner eager to learn the basics or an experienced programmer looking to challenge your skills, there are countless Python projects to help you grow.Hereâs a list
10 min read
Projects for Beginners
Number guessing game in Python 3 and CThe objective of this project is to build a simple number guessing game that challenges the user to identify a randomly selected number within a specified range. The game begins by allowing the user to define a range by entering a lower and an upper bound (for example, from A to B). Once the range i
4 min read
Python Program for word Guessing GameLearn how to create a simple Python word-guessing game, where players attempt to guess a randomly selected word within a limited number of tries.Word guessing Game in PythonThis program is a simple word-guessing game where the user has to guess the characters in a randomly selected word within a lim
5 min read
Hangman Game in PythonHangman Wiki:The origins of Hangman are obscure meaning not discovered, but it seems to have arisen in Victorian times, " says Tony Augarde, author of The Oxford Guide to Word Games. The game is mentioned in Alice Bertha Gomme's "Traditional Games" in 1894 under the name "Birds, Beasts and Fishes."
8 min read
21 Number game in Python21, Bagram, or Twenty plus one is a game which progresses by counting up 1 to 21, with the player who calls "21" is eliminated. It can be played between any number of players. Implementation This is a simple 21 number game using Python programming language. The game illustrated here is between the p
11 min read
Mastermind Game using PythonGiven the present generation's acquaintance with gaming and its highly demanded technology, many aspire to pursue the idea of developing and advancing it further. Eventually, everyone starts at the beginning. Mastermind is an old code-breaking game played by two players. The game goes back to the 19
8 min read
2048 Game in PythonIn this article we will look python code and logic to design a 2048 game you have played very often in your smartphone. If you are not familiar with the game, it is highly recommended to first play the game so that you can understand the basic functioning of it.How to play 2048 :1. There is a 4*4 gr
10 min read
Python | Program to implement simple FLAMES gamePython is a multipurpose language and one can do literally anything with it. Python can also be used for game development. Letâs create a simple FLAMES game without using any external game libraries like PyGame. FLAMES is a popular game named after the acronym: Friends, Lovers, Affectionate, Marriag
6 min read
Python | Pokémon Training GameProblem : You are a Pokémon trainer. Each Pokémon has its own power, described by a positive integer value. As you travel, you watch Pokémon and you catch each of them. After each catch, you have to display maximum and minimum powers of Pokémon caught so far. You must have linear time complexity. So
1 min read
Python program to implement Rock Paper Scissor gamePython is a multipurpose language and one can do anything with it. Python can also be used for game development. Let's create a simple command-line Rock-Paper-Scissor game without using any external game libraries like PyGame. In this game, the user gets the first chance to pick the option between R
5 min read
Taking Screenshots using pyscreenshot in PythonPython offers multiple libraries to ease our work. Here we will learn how to take a screenshot using Python. Python provides a module called pyscreenshot for this task. It is only a pure Python wrapper, a thin layer over existing backends. Performance and interactivity are not important for this lib
2 min read
Desktop Notifier in PythonThis article demonstrates how to create a simple Desktop Notifier application using Python. A desktop notifier is a simple application which produces a notification message in form of a pop-up message on desktop. Notification content In the example we use in this article, the content that will appea
4 min read
Get Live Weather Desktop Notifications Using PythonWe know weather updates are how much important in our day-to-day life. So, We are introducing the logic and script with some easiest way to understand for everyone. Letâs see a simple Python script to show the live update for Weather information. Modules Needed In this script, we are using some lib
3 min read
How to use pynput to make a Keylogger?Prerequisites: Python Programming LanguageThe package pynput.keyboard contains classes for controlling and monitoring the keyboard. pynput is the library of Python that can be used to capture keyboard inputs there the coolest use of this can lie in making keyloggers. The code for the keylogger is gi
1 min read
Python - Cows and Bulls gameCows and Bulls is a pen and paper code-breaking game usually played between 2 players. In this, a player tries to guess a secret code number chosen by the second player. The rules are as follows: A player will create a secret code, usually a 4-digit number. Â This number should have no repeated digit
3 min read
Simple Attendance Tracker using PythonIn many colleges, we have an attendance system for each subject, and the lack of the same leads to problems. It is difficult for students to remember the number of leaves taken for a particular subject. If every time paperwork has to be done to track the number of leaves taken by staff and check whe
9 min read
Higher-Lower Game with PythonIn this article, we will be looking at the way to design a game in which the user has to guess which has a higher number of followers and it displays the scores. Game Play:The name of some Instagram accounts will be displayed, you have to guess which has a higher number of followers by typing in the
8 min read
Fun Fact Generator Web App in PythonIn this article, we will discuss how to create a Fun Fact Generator Web App in Python using the PyWebio module. Essentially, it will create interesting facts at random and display them on the web interface. This script will retrieve data from uselessfacts.jsph.pl with the help of GET method, and we
3 min read
Check if two PDF documents are identical with PythonPython is an interpreted and general purpose programming language. It is a Object-Oriented and Procedural paradigms programming language. There are various types of modules imported in python such as difflib, hashlib. Modules used:difflib : It is a module that contains function that allows to compar
2 min read
Creating payment receipts using PythonCreating payment receipts is a pretty common task, be it an e-commerce website or any local store for that matter. Here, we will see how to create our own transaction receipts just by using python. We would be using reportlab to generate the PDFs. Generally, it comes as a built-in package but someti
3 min read
How To Create a Countdown Timer Using Python?In this article, we will see how to create a countdown timer using Python. The code will take input from the user regarding the length of the countdown in seconds. After that, a countdown will begin on the screen of the format 'minutes: seconds'. We will use the time module here.Step-by-Step Approac
2 min read
Convert emoji into text in PythonConverting emoticons or emojis into text in Python can be done using the demoji module. It is used to accurately remove and replace emojis in text strings. To install the demoji module the below command can be used: pip install demoji The demoji module also requires an initial download of data from
1 min read
Create a Voice Recorder using PythonPython can be used to perform a variety of tasks. One of them is creating a voice recorder. We can use python's sounddevice module to record and play audio. This module along with the wavio or the scipy module provides a way to save recorded audio.Installation:sounddevice: This module provides funct
3 min read
Create a Screen recorder using PythonPython is a widely used general-purpose language. It allows for performing a variety of tasks. One of them can be recording a video. It provides a module named pyautogui which can be used for the same. This module along with NumPy and OpenCV provides a way to manipulate and save the images (screensh
5 min read
Projects for Intermediate
How to Build a Simple Auto-Login Bot with PythonIn this article, we are going to see how to built a simple auto-login bot using python. In this present scenario, every website uses authentication and we have to log in by entering proper credentials. But sometimes it becomes very hectic to login again and again to a particular website. So, to come
3 min read
How to make a Twitter Bot in Python?Twitter is an American microblogging and social networking service on which users post and interact with messages known as "tweets". In this article we will make a Twitter Bot using Python. Python as well as Javascript can be used to develop an automatic Twitter bot that can do many tasks by its own
3 min read
Building WhatsApp bot on PythonA WhatsApp bot is application software that is able to carry on communication with humans in a spoken or written manner. And today we are going to learn how we can create a WhatsApp bot using python. First, let's see the requirements for building the WhatsApp bot using python language. System Requir
6 min read
Create a Telegram Bot using PythonIn this article, we are going to see how to create a telegram bot using Python. In recent times Telegram has become one of the most used messaging and content sharing platforms, it has no file sharing limit like Whatsapp and it comes with some preinstalled bots one can use in any channels (groups in
6 min read
Twitter Sentiment Analysis using PythonThis article covers the sentiment analysis of any topic by parsing the tweets fetched from Twitter using Python. What is sentiment analysis? Sentiment Analysis is the process of 'computationally' determining whether a piece of writing is positive, negative or neutral. Itâs also known as opinion mini
10 min read
Employee Management System using PythonThe task is to create a Database-driven Employee Management System in Python that will store the information in the MySQL Database. The script will contain the following operations : Add EmployeeRemove EmployeePromote EmployeeDisplay EmployeesThe idea is that we perform different changes in our Empl
8 min read
How to make a Python auto clicker?Auto-clickers are tools that simulate mouse clicks automatically at a given location and interval. Whether you're automating repetitive tasks in games, productivity applications, or testing graphical user interfaces (GUIs), creating an auto-clicker in Python is both a fun and practical project. In t
4 min read
Instagram Bot using Python and InstaPyIn this article, we will design a simple fun project âInstagram Botâ using Python and InstaPy. As beginners want to do some extra and learning small projects so that it will help in building big future projects. Now, this is the time to learn some new projects and a better future. This python projec
3 min read
File Sharing App using PythonComputer Networks is an important topic and to understand the concepts, practical application of the concepts is needed. In this particular article, we will see how to make a simple file-sharing app using Python. Â An HTTP Web Server is software that understands URLs (web address) and HTTP (the proto
4 min read
Send message to Telegram user using PythonHave you ever wondered how people do automation on Telegram? You may know that Telegram has a big user base and so it is one of the preferred social media to read people. What good thing about Telegram is that it provides a bunch of API's methods, unlike Whatsapp which restricts such things. So in t
3 min read
Python | Whatsapp birthday botHave you ever wished to automatically wish your friends on their birthdays, or send a set of messages to your friend ( or any Whastapp contact! ) automatically at a pre-set time, or send your friends by sending thousands of random text on whatsapp! Using Browser Automation you can do all of it and m
10 min read
Corona HelpBotThis is a chatbot that will give answers to most of your corona-related questions/FAQ. The chatbot will give you answers from the data given by WHO(https://www.who.int/). This will help those who need information or help to know more about this virus. It uses a neural network with two hidden layers(
9 min read
Amazon product availability checker using PythonAs we know Python is a multi-purpose language and widely used for scripting. Its usage is not just limited to solve complex calculations but also to automate daily life task. Letâs say we want to track any Amazon product availability and grab the deal when the product availability changes and inform
3 min read
Python | Fetch your gmail emails from a particular userIf you are ever curious to know how we can fetch Gmail e-mails using Python then this article is for you.As we know Python is a multi-utility language which can be used to do a wide range of tasks. Fetching Gmail emails though is a tedious task but with Python, many things can be done if you are wel
5 min read
How to Create a Chatbot in Android with BrainShop API?We have seen many apps and websites in which we will get to see a chatbot where we can chat along with the chatbot and can easily get solutions for our questions answered from the chatbot. In this article, we will take a look at building a chatbot in Android. What we are going to build in this artic
11 min read
Spam bot using PyAutoGUIPyAutoGUI is a Python module that helps us automate the key presses and mouse clicks programmatically. In this article we will learn to develop a spam bot using PyAutoGUI. Spamming - Refers to sending unsolicited messages to large number of systems over the internet. This mini-project can be used f
2 min read
Hotel Management SystemGiven the data for Hotel management and User:Hotel Data: Hotel Name Room Available Location Rating Price per RoomH1 4 Bangalore 5 100H2 5 Bangalore 5 200H3 6 Mumbai 3 100User Data: User Name UserID Booking CostU1 2 1000U2 3 1200U3 4 1100The task is to answer the following question. Print the hotel d
15+ min read
Web Scraping
Build a COVID19 Vaccine Tracker Using PythonAs we know the world is facing an unprecedented challenge with communities and economies everywhere affected by the COVID19. So, we are going to do some fun during this time by tracking their vaccine. Let's see a simple Python script to improve for tracking the COVID19 vaccine. Modules Neededbs4: Be
2 min read
Email Id Extractor Project from sites in Scrapy PythonScrapy is open-source web-crawling framework written in Python used for web scraping, it can also be used to extract data for general-purpose. First all sub pages links are taken from the main page and then email id are scraped from these sub pages using regular expression. This article shows the e
8 min read
Automating Scrolling using Python-Opencv by Color DetectionPrerequisites:Â OpencvPyAutoGUI It is possible to perform actions without actually giving any input through touchpad or mouse. This article discusses how this can be done using opencv module. Here we will use color detection to scroll screen. When a certain color is detected by the program during ex
2 min read
How to scrape data from google maps using Python ?In this article, we will discuss how to scrape data like Names, Ratings, Descriptions, Reviews, addresses, Contact numbers, etc. from google maps using Python. Modules needed:Selenium: Usually, to automate testing, Selenium is used. We can do this for scraping also as the browser automation here hel
6 min read
Scraping weather data using Python to get umbrella reminder on emailIn this article, we are going to see how to scrape weather data using Python and get reminders on email. If the weather condition is rainy or cloudy this program will send you an "umbrella reminder" to your email reminding you to pack an umbrella before leaving the house. Â We will scrape the weather
5 min read
Scraping Reddit using PythonIn this article, we are going to see how to scrape Reddit using Python, here we will be using python's PRAW (Python Reddit API Wrapper) module to scrape the data. Praw is an acronym Python Reddit API wrapper, it allows Reddit API through Python scripts. Installation To install PRAW, run the followin
4 min read
How to fetch data from Jira in Python?Jira is an agile, project management tool, developed by Atlassian, primarily used for, tracking project bugs, and, issues. It has gradually developed, into a powerful, work management tool, that can handle, all stages of agile methodology. In this article, we will learn, how to fetch data, from Jira
8 min read
Scrape most reviewed news and tweet using PythonMany websites will be providing trendy news in any technology and the article can be rated by means of its review count. Suppose the news is for cryptocurrencies and news articles are scraped from cointelegraph.com, we can get each news item reviewer to count easily and placed in MongoDB collection.
4 min read
Extraction of Tweets using TweepyIntroduction: Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and acce
5 min read
Predicting Air Quality Index using PythonAir pollution is a growing concern globally, and with increasing industrialization and urbanization, it becomes crucial to monitor and predict air quality in real-time. One of the most reliable ways to quantify air pollution is by calculating the Air Quality Index (AQI). In this article, we will exp
3 min read
Scrape Content from Dynamic WebsitesScraping from dynamic websites means extracting data from pages where content is loaded or updated using JavaScript after the initial HTML is delivered. Unlike static websites, dynamic ones require tools that can handle JavaScript execution to access the fully rendered content. Simple scrapers like
5 min read
Automating boring Stuff Using Python
Automate Instagram Messages using PythonIn this article, we will see how to send a single message to any number of people. We just have to provide a list of users. We will use selenium for this task. Packages neededSelenium: It is an open-source tool that automates web browsers. It provides a single interface that lets you write test scri
6 min read
Python | Automating Happy Birthday post on Facebook using SeleniumAs we know Selenium is a tool used for controlling web browsers through a program. It can be used in all browsers, OS, and its program are written in various programming languages i.e Java, Python (all versions). Selenium helps us automate any kind of task that we frequently do on our laptops, PCs
3 min read
Automatic Birthday mail sending with PythonAre you bored with sending birthday wishes to your friends or do you forget to send wishes to your friends or do you want to wish them at 12 AM but you always fall asleep? Why not automate this simple task by writing a Python script. The first thing we do is import six libraries:Â pandasdatetimesmtp
3 min read
Automated software testing with PythonSoftware testing is the process in which a developer ensures that the actual output of the software matches with the desired output by providing some test inputs to the software. Software testing is an important step because if performed properly, it can help the developer to find bugs in the softwa
12 min read
Python | Automate Google Search using SeleniumGoogle search can be automated using Python script in just 2 minutes. This can be done using selenium (a browser automation tool). Selenium is a portable framework for testing web applications. It can automatically perform the same interactions that any you need to perform manually and this is a sma
3 min read
Automate linkedin connections using PythonAutomating LinkedIn connections using Python involves creating a script that navigates LinkedIn, finds users based on specific criteria (e.g., job title, company, or location), and sends personalized connection requests. In this article, we will walk you through the process, using Selenium for web a
5 min read
Automated Trading using PythonAutomated trading using Python involves building a program that can analyze market data and make trading decisions. Weâll use yfinance to get stock market data, Pandas and NumPy to organize and analyze it and Matplotlib to create simple charts to see trends and patterns. The idea is to use past stoc
4 min read
Automate the Conversion from Python2 to Python3We can convert Python2 scripts to Python3 scripts by using 2to3 module. It changes Python2 syntax to Python3 syntax. We can change all the files in a particular folder from python2 to python3. Installation This module does not come built-in with Python. To install this type the below command in the
1 min read
Bulk Posting on Facebook Pages using SeleniumAs we are aware that there are multiple tasks in the marketing agencies which are happening manually, and one of those tasks is bulk posting on several Facebook pages, which is very time-consuming and sometimes very tedious to do. In this project-based article, we are going to explore a solution tha
9 min read
Share WhatsApp Web without Scanning QR code using PythonPrerequisite: Selenium, Browser Automation Using Selenium In this article, we are going to see how to share your Web-WhatsApp with anyone over the Internet without Scanning a QR code. Web-Whatsapp store sessions Web Whatsapp stores sessions in IndexedDB with the name wawc and syncs those key-value p
5 min read
Automate WhatsApp Messages With Python using Pywhatkit moduleWe can automate a Python script to send WhatsApp messages. In this article, we will learn the easiest ways using pywhatkit module that the website web.whatsapp.com uses to automate the sending of messages to any WhatsApp number. Installing pywhatkit module: pywhatkit is a python module for sending W
4 min read
How to Send Automated Email Messages in PythonIn this article, we are going to see how to send automated email messages which involve delivering text messages, essential photos, and important files, among other things. in Python. We'll be using two libraries for this: email, and smtplib, as well as the MIMEMultipart object. This object has mul
6 min read
Automate backup with Python ScriptIn this article, we are going to see how to automate backup with a Python script. File backups are essential for preserving your data in local storage. We will use the shutil, os, and sys modules. In this case, the shutil module is used to copy data from one file to another, while the os and sys mod
4 min read
Automated software testing with PythonSoftware testing is the process in which a developer ensures that the actual output of the software matches with the desired output by providing some test inputs to the software. Software testing is an important step because if performed properly, it can help the developer to find bugs in the softwa
12 min read
Hotword detection with PythonMost of us have heard about Alexa, Ok google or hey Siri and may have thought of creating your own Virtual Personal Assistant with your favorite name like, Hey Thanos!. So here's the easiest way to do it without getting your hands dirty.Requirements: Linux pc with working microphones (I have tested
2 min read
Automate linkedin connections using PythonAutomating LinkedIn connections using Python involves creating a script that navigates LinkedIn, finds users based on specific criteria (e.g., job title, company, or location), and sends personalized connection requests. In this article, we will walk you through the process, using Selenium for web a
5 min read
Tkinter Projects
Create First GUI Application using Python-TkinterWe are now stepping into making applications with graphical elements, we will learn how to make cool apps and focus more on its GUI(Graphical User Interface) using Tkinter.What is Tkinter?Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is th
12 min read
Python | Simple GUI calculator using TkinterPrerequisite: Tkinter Introduction, lambda function Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter
6 min read
Python - Compound Interest GUI Calculator using TkinterPython offers multiple options for developing a GUI (Graphical User Interface). Out of all the Python GUI Libraries, Tkinter is the most commonly used method. In this article, we will learn how to create a Compound Interest GUI Calculator application using Tkinter.Letâs create a GUI-based Compound I
6 min read
Python | Loan calculator using TkinterPrerequisite: Tkinter Introduction Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter outputs the fastest
5 min read
Rank Based Percentile Gui Calculator using TkinterPython offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. In this article, we will learn how to create a Rank Based - Percentile Gui Calculator application using Tkinter, with a step-by-step guide. Prerequisi
7 min read
Standard GUI Unit Converter using Tkinter in PythonPrerequisites: Introduction to tkinter, Introduction to webbrowser In this article, we will learn how to create a standard converter using tkinter. Now we are going to create an introduction window that displays loading bar, welcome text, and user's social media profile links so that when he/she sha
12 min read
Create Table Using TkinterPython offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applicat
3 min read
Python | GUI Calendar using TkinterPrerequisites: Introduction to Tkinter Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter outputs the fastest and easiest way to create GUI applications. In this article, we will le
4 min read
File Explorer in Python using TkinterPrerequisites: Introduction to Tkinter Python offers various modules to create graphics programs. Out of these Tkinter provides the fastest and easiest way to create GUI applications. The following steps are involved in creating a tkinter application: Importing the Tkinter module. Creation of the
2 min read
Python | ToDo GUI Application using TkinterPrerequisites : Introduction to tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. In this article, we will learn how to create a ToDo GUI application using Tkinter, with a step-by-step guide.
5 min read
Python: Weight Conversion GUI using TkinterPrerequisites: Python GUI â tkinterPython offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter outputs the fastes
2 min read
Python: Age Calculator using TkinterPrerequisites :Introduction to tkinter Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter outputs the fa
5 min read
Python | Create a GUI Marksheet using TkinterCreate a python GUI mark sheet. Where credits of each subject are given, enter the grades obtained in each subject and click on Submit. The credits per subject, the total credits as well as the SGPA are displayed after being calculated automatically. Use Tkinter to create the GUI interface. Refer t
8 min read
Python | Create a digital clock using TkinterAs we know Tkinter is used to create a variety of GUI (Graphical User Interface) applications. In this article we will learn how to create a Digital clock using Tkinter. Prerequisites: Python functions Tkinter basics (Label Widget) Time module Using Label widget from Tkinter and time module: In the
2 min read
Create Countdown Timer using Python-TkinterPrerequisites: Python GUI â tkinterPython Tkinter is a GUI programming package or built-in library. Tkinter provides the Tk GUI toolkit with a potent object-oriented interface. Python with Tkinter is the fastest and easiest way to create GUI applications. Creating a GUI using Tkinter is an easy task
2 min read
Tkinter Application to Switch Between Different Page FramesPrerequisites: Python GUI â tkinter Sometimes it happens that we need to create an application with several pops up dialog boxes, i.e Page Frames. Here is a step by step process to create multiple Tkinter Page Frames and link them! This can be used as a boilerplate for more complex python GUI applic
6 min read
Color game using Tkinter in PythonTKinter is widely used for developing GUI applications. Along with applications, we can also use Tkinter GUI to develop games. Let's try to make a game using Tkinter. In this game player has to enter color of the word that appears on the screen and hence the score increases by one, the total time to
4 min read
Python | Simple FLAMES game using TkinterPrerequisites: Introduction to TkinterProgram to implement simple FLAMES game Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Pyt
5 min read
Simple registration form using Python TkinterTkinter is Python's standard GUI (Graphical User Interface) library and OpenPyXL is a module that allows for reading and writing Excel files. This guide shows you how to create a simple registration form with Tkinter, where users enter their details and those details are written into an Excel file.
2 min read
Image Viewer App in Python using TkinterPrerequisites: Python GUI â tkinter, Python: Pillow Have you ever wondered to make a Image viewer with the help of Python? Here is a solution to making the Image viewer with the help of Python. We can do this with the help of Tkinter and pillow. We will discuss the module needed and code below. Mod
5 min read
How to create a COVID19 Data Representation GUI?Prerequisites: Python Requests, Python GUI â tkinterSometimes we just want a quick fast tool to really tell whats the current update, we just need a bare minimum of data. Web scraping deals with taking some data from the web and then processing it and displaying the relevant content in a short and c
2 min read
GUI to Shutdown, Restart and Logout from the PC using PythonIn this article, we are going to write a python script to shut down or Restart or Logout your system and bind it with GUI Application. The OS module in Python provides functions for interacting with the operating system. OS is an inbuilt library python. Syntax : For shutdown your system : os.system
1 min read
Create a GUI to extract Lyrics from song Using PythonIn this article, we are going to write a python script to extract lyrics from the song and bind with its GUI application. We will use lyrics-extractor to get lyrics of a song just by passing in the song name, it extracts and returns the song's title and song lyrics from various websites. Before star
3 min read
Application to get live USD/INR rate Using PythonIn this article, we are going to write a python scripts to get live information of USD/INR rate and bind with it GUI application. Modules Required:bs4: Beautiful Soup is a Python library for pulling data out of HTML and XML files. Installation: pip install bs4requests: This module allows you to send
3 min read
Build an Application for Screen Rotation Using PythonIn this article, we are going to write a python script for screen rotation and implement it with GUI. The display can be modified to four orientations using some methods from the rotatescreen module, it is a small Python package for rotating the screen in a system. Installation:pip install rotate-s
2 min read
Build an Application to Search Installed Application using PythonIn this article, we are going to write python scripts to search for an installed application on Windows and bind it with the GUI application. We are using winapps modules for managing installed applications on Windows. Prerequisite - Tkinter in Python To install the module, run this command in your
6 min read
Text detection using PythonPython language is widely used for modern machine learning and data analysis. One can detect an image, speech, can even detect an object through Python. For now, we will detect whether the text from the user gives a positive feeling or negative feeling by classifying the text as positive, negative,
4 min read
Python - Spell Corrector GUI using TkinterPython offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter outputs the fastest and easiest way to create GUI applications. In this article, we will learn how to create a GUI Spell Corrector
5 min read
Make Notepad using TkinterLet's see how to create a simple notepad in Python using Tkinter. This notepad GUI will consist of various menu like file and edit, using which all functionalities like saving the file, opening a file, editing, cut and paste can be done. Now for creating this notepad, Python 3 and Tkinter should alr
6 min read
Sentiment Detector GUI using Tkinter - PythonPrerequisites : Introduction to tkinter | Sentiment Analysis using Vader Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. Python with Tkinter outputs the fastest and easiest way to create GUI applica
4 min read
Create a GUI for Weather Forecast using openweathermap API in PythonPrerequisites: Find current weather of any city using openweathermap API The idea of this article is to provide a simple GUI application to users to get the current temperature of any city they wish to see. The system also provides a simple user interface for simplification of application. It also p
4 min read
Build a Voice Recorder GUI using PythonPrerequisites: Python GUI â tkinter, Create a Voice Recorder using Python Python provides various tools and can be used for various purposes. One such purpose is recording voice. It can be done using the sounddevice module. This recorded file can be saved using the soundfile module Module NeededSoun
2 min read
Create a Sideshow application in PythonIn this article, we will create a slideshow application i.e we can see the next image without changing it manually or by clicking. Modules Required:Tkinter: The tkinter package (âTk interfaceâ) is the standard Python interface to the Tk GUI toolkit.Pillow: The Python Imaging Library adds image proc
2 min read
Visiting Card Scanner GUI Application using PythonPython is an emerging programming language that consists of many in-built modules and libraries. Which provides support to many web and agile applications. Due to its clean and concise syntax behavior, many gigantic and renowned organizations like Instagram, Netflix so-and-so forth are working in Py
6 min read
Turtle Projects
Create digital clock using Python-TurtleTurtle is a special feature of Python. Using Turtle, we can easily draw on a drawing board. First, we import the turtle module. Then create a window, next we create a turtle object and using the turtle methods we can draw in the drawing board. Prerequisites: Turtle Programming in Python Installation
3 min read
Draw a Tic Tac Toe Board using Python-TurtleThe Task Here is to Make a Tic Tac Toe board layout using Turtle Graphics in Python. For that lets first know what is Turtle Graphics. Turtle graphics In computer graphics, turtle graphics are vector graphics using a relative cursor upon a Cartesian plane. Turtle is drawing board like feature which
2 min read
Draw Chess Board Using Turtle in PythonPrerequisite: Turtle Programming Basics Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle (pen). To move turtle, there are some functions i.e forward(), backward(), etc. For drawing Ches
2 min read
Draw an Olympic Symbol in Python using TurtlePrerequisites: Turtle Programming in Python The Olympic rings are five interlaced rings, colored blue, yellow, black, green, and red on a white field. As shown in the below image. Approach:import Turtle moduleset the thickness for each ringdraw each circle with specific coordinates Below is the impl
1 min read
Draw Rainbow using Turtle Graphics in PythonTurtle is an inbuilt module in Python. It provides:Â Drawing using a screen (cardboard).Turtle (pen). To draw something on the screen, we need to move the turtle (pen), and to move the turtle, there are some functions like the forward(), backward(), etc. Prerequisite: Turtle Programming Basics Draw
2 min read
How to Make an Indian Flag in PythonHere, we will be making "The Great Indian Flag" using Python. Python's turtle graphics module is built into the Python software installation and is part of the standard library. This means that you don't need to install anything extra to use the turtle lib. Here, we will be using many turtle functio
3 min read
Draw moving object using Turtle in PythonPrerequisite: Python Turtle Basics Turtle is an inbuilt module in python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle. To move turtle, there are some functions i.e forward(), backward(), etc. 1.)Move the Object (ball)
2 min read
Create a simple Animation using Turtle in PythonTurtle is a built-in Python module that provides a simple way to draw and create graphics using a virtual turtle on the screen. You can control the turtle using commands like forward() and right() to move it around and draw shapes. In this article, we'll use Turtle to create a fun animation where mu
2 min read
Create a Simple Two Player Game using Turtle in PythonPrerequisites: Turtle Programming in Python TurtleMove game is basically a luck-based game. In this game two-players (Red & Blue), using their own turtle (object) play the game. How to play The game is played in the predefined grid having some boundaries. Both players move the turtle for a unit
4 min read
Flipping Tiles (memory game) using Python3Flipping tiles game can be played to test our memory. In this, we have a certain even number of tiles, in which each number/figure has a pair. The tiles are facing downwards, and we have to flip them to see them. In a turn, one flips 2 tiles, if the tiles match then they are removed. If not then the
3 min read
Create pong game using Python - TurtlePong is one of the most famous arcade games, simulating table tennis. Each player controls a paddle in the game by dragging it vertically across the screen's left or right side. Players use their paddles to strike back and forth on the ball. Turtle is an inbuilt graphic module in Python. It uses a p
3 min read
OpenCV Projects
Python | Program to extract frames using OpenCVOpenCV comes with many powerful video editing functions. In the current scenario, techniques such as image scanning and face recognition can be accomplished using OpenCV. OpenCV library can be used to perform multiple operations on videos. Letâs try to do something interesting using CV2. Take a vide
2 min read
Displaying the coordinates of the points clicked on the image using Python-OpenCVOpenCV helps us to control and manage different types of mouse events and gives us the flexibility to operate them. There are many types of mouse events. These events can be displayed by running the following code segment : import cv2 [print(i) for i in dir(cv2) if 'EVENT' in i] Output : EVENT_FLAG_
3 min read
White and black dot detection using OpenCV | PythonImage processing using Python is one of the hottest topics in today's world. But image processing is a bit complex and beginners get bored in their first approach. So in this article, we have a very basic image processing python program to count black dots in white surface and white dots in the blac
4 min read
Python | OpenCV BGR color palette with trackbarsOpenCV is a library of programming functions mainly aimed at real-time computer vision. In this article, Let's create a window which will contain RGB color palette with track bars. By moving the trackbars the value of RGB Colors will change b/w 0 to 255. So using the same, we can find the color with
2 min read
Draw a rectangular shape and extract objects using Python's OpenCVOpenCV is an open-source computer vision and machine learning software library. Various image processing operations such as manipulating images and applying tons of filters can be done with the help of it. It is broadly used in Object detection, Face Detection, and other Image processing tasks. Let'
4 min read
Drawing with Mouse on Images using Python-OpenCVOpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human. In this article, we
3 min read
Text Detection and Extraction using OpenCV and OCROptical Character Recognition (OCR) is a technology used to extract text from images which is used in applications like document digitization, license plate recognition and automated data entry. In this article, we explore how to detect and extract text from images using OpenCV for image processing
2 min read
Invisible Cloak using OpenCV | Python ProjectHave you ever seen Harry Potter's Invisible Cloak; Was it wonderful? Have you ever wanted to wear that cloak? If Yes!! then in this post, we will build the same cloak which Harry Potter uses to become invisible. Yes, we are not building it in a real way but it is all about graphics trickery. In this
4 min read
Background subtraction - OpenCVBackground subtraction is a way of eliminating the background from image. To achieve this we extract the moving foreground from the static background. Background Subtraction has several use cases in everyday life, It is being used for object segmentation, security enhancement, pedestrian tracking, c
2 min read
ML | Unsupervised Face Clustering PipelineLive face-recognition is a problem that automated security division still face. With the advancements in Convolutions Neural Networks and specifically creative ways of Region-CNN, itâs already confirmed that with our current technologies, we can opt for supervised learning options such as FaceNet, Y
15+ min read
Pedestrian Detection using OpenCV-PythonOpenCV is an open-source library, which is aimed at real-time computer vision. This library is developed by Intel and is cross-platform - it can support Python, C++, Java, etc. Computer Vision is a cutting edge field of Computer Science that aims to enable computers to understand what is being seen
3 min read
Saving Operated Video from a webcam using OpenCVOpenCV is a vast library that helps in providing various functions for image and video operations. With OpenCV, we can perform operations on the input video. OpenCV also allows us to save that operated video for further usage. For saving images, we use cv2.imwrite() which saves the image to a specif
4 min read
Face Detection using Python and OpenCV with webcamFace detection is a important application of computer vision that involves identifying human faces in images or videos. In this Article, we will see how to build a simple real-time face detection application using Python and OpenCV where webcam will be used as the input source.Step 1: Installing Ope
3 min read
Gun Detection using Python-OpenCVGun Detection using Object Detection is a helpful tool to have in your repository. It forms the backbone of many fantastic industrial applications. We can use this project for real threat detection in companies or organizations. Prerequisites: Python OpenCV OpenCV(Open Source Computer Vision Libra
4 min read
Multiple Color Detection in Real-Time using Python-OpenCVFor a robot to visualize the environment, along with the object detection, detection of its color in real-time is also very important. Why this is important? : Some Real-world ApplicationsIn self-driving car, to detect the traffic signals.Multiple color detection is used in some industrial robots, t
4 min read
Detecting objects of similar color in Python using OpenCVOpenCVÂ is a library of programming functions mainly aimed at real-time computer vision. In this article, we will see how to get the objects of the same color in an image. We can select a color by slide bar which is created by the cv2 command cv2.createTrackbar. Libraries needed:OpenCV NumpyApproach:
3 min read
Opening multiple color windows to capture using OpenCV in PythonOpenCV is an open source computer vision library that works with many programming languages and provides a vast scope to understand the subject of computer vision.In this example we will use OpenCV to open the camera of the system and capture the video in two different colors. Approach: With the lib
2 min read
Python | Play a video in reverse mode using OpenCVOpenCV (Open Source Computer Vision) is a computer vision library that contains various functions to perform operations on Images or videos. OpenCV's application areas include : 1) Facial recognition system 2) motion tracking 3) Artificial neural network 4) Deep neural network 5) video streaming etc
3 min read
Template matching using OpenCV in PythonTemplate matching is a technique for finding areas of an image that are similar to a patch (template). A patch is a small image with certain features. The goal of template matching is to find the patch/template in an image. To find it, the user has to give two input images: Source Image (S) - The im
6 min read
Cartooning an Image using OpenCV - PythonInstead of sketching images by hand we can use OpenCV to convert a image into cartoon image. In this tutorial you'll learn how to turn any image into a cartoon. We will apply a series of steps like:Smoothing the image (like a painting)Detecting edges (like a sketch)Combining both to get a cartoon ef
2 min read
Vehicle detection using OpenCV PythonVehicle detection is an important application of computer vision that helps in monitoring traffic, automating parking systems and surveillance systems. In this article, weâll implement a simple vehicle detection system using Python and OpenCV using a pre-trained Haar Cascade classifier and we will g
3 min read
Count number of Faces using Python - OpenCVPrerequisites: Face detection using dlib and openCV In this article, we will use image processing to detect and count the number of faces. We are not supposed to get all the features of the face. Instead, the objective is to obtain the bounding box through some methods i.e. coordinates of the face i
3 min read
Live Webcam Drawing using OpenCVLet us see how to draw the movement of objects captured by the webcam using OpenCV. Our program takes the video input from the webcam and tracks the objects we are moving. After identifying the objects, it will make contours precisely. After that, it will print all your drawing on the output screen.
3 min read
Detect and Recognize Car License Plate from a video in real timeRecognizing a Car License Plate is a very important task for a camera surveillance-based security system. We can extract the license plate from an image using some computer vision techniques and then we can use Optical Character Recognition to recognize the license number. Here I will guide you thro
11 min read
Track objects with Camshift using OpenCVOpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a
3 min read
Replace Green Screen using OpenCV- PythonPrerequisites: OpenCV Python TutorialOpenCV (Open Source Computer Vision) is a computer vision library that contains various functions to perform operations on pictures or videos. This library is cross-platform that is it is available on multiple programming languages such as Python, C++, etc.Green
1 min read
Python - Eye blink detection projectIn this tutorial you will learn about detecting a blink of human eye with the feature mappers knows as haar cascades. Here in the project, we will use the python language along with the OpenCV library for the algorithm execution and image processing respectively. The haar cascades we are going to us
4 min read
Connect your android phone camera to OpenCV - PythonPrerequisites: OpenCV OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human
2 min read
Determine The Face Tilt Using OpenCV - PythonIn this article, we are going to see how to determine the face tilt using OpenCV in Python. To achieve this we will be using a popular computer vision library opencv-python. In this program with the help of the OpenCV library, we will detect faces in a live stream from a webcam or a video file and s
4 min read
Right and Left Hand Detection Using PythonIn this article, we are going to see how to Detect Hands using Python. We will use mediapipe and OpenCV libraries in python to detect the Right Hand and Left Hand. We will be using the Hands model from mediapipe solutions to detect hands, it is a palm detection model that operates on the full image
5 min read
Brightness Control With Hand Detection using OpenCV in PythonIn this article, we are going to make a Python project that uses OpenCV and Mediapipe to see hand gesture and accordingly set the brightness of the system from a range of 0-100. We have used a HandTracking module that tracks all points on the hand and detects hand landmarks, calculate the distance
6 min read
Creating a Finger Counter Using Computer Vision and OpenCv in PythonIn this article we are going to create a finger counter using Computer Vision and OpenCv. This is a simple project that can be applied in various fields such as gesture recognition, human-computer interaction and educational tools. By the end of this article you will have a working Python applicatio
5 min read
Python Django Projects
Python Web Development With DjangoPython Django is a web framework that allows to quickly create efficient web pages. Django is also called batteries included framework because it provides built-in features such as Django Admin Interface, default database - SQLite3, etc. When youâre building a website, you always need a similar set
15+ min read
How to Create an App in Django ?In Django, an app is a web application that performs a specific functionality, such as blog posts, user authentication or comments. A single Django project can consist of multiple apps, each designed to handle a particular task. Each app is a modular and reusable component that includes everything n
3 min read
Weather app using Django - PythonOur task is to create a Weather app using Django that lets users enter a city name and view current weather details like temperature, humidity, and pressure. We will build this by setting up a Django project, creating a view to fetch data from the OpenWeatherMap API, and designing a simple template
2 min read
Django Sign Up and login with confirmation Email | PythonDjango provides a built-in authentication system that handles users, login, logout, and registration. In this article, we will implement a user registration and login system with email confirmation using Django and django-crispy-forms for elegant form rendering.Install crispy forms using the termina
7 min read
ToDo webapp using DjangoOur task is to create a simple ToDo app using Django that allows users to add, view, and delete notes. We will build this by setting up a Django project, creating a Todo model, designing forms and views to handle user input, and creating templates to display the tasks. Step-by-step, we'll implement
4 min read
How to Send Email with DjangoDjango, a high-level Python web framework, provides built-in functionality to send emails effortlessly. Whether you're notifying users about account activations, sending password reset links, or dispatching newsletters, Djangoâs robust email handling system offers a straightforward way to manage ema
4 min read
Django project to create a Comments SystemWe will build a straightforward Django app where users can view posts and add comments, all using just two simple templates. We will learn how to set up models, handle form submissions and create clean views to power an interactive comment system. Itâs perfect for getting a solid foundation with Dja
4 min read
Voting System Project Using Django FrameworkProject Title: Pollster (Voting System) web application using Django frameworkType of Application (Category): Web application.Introduction: We will create a pollster (voting system) web application using Django. This application will conduct a series of questions along with many choices. A user will
13 min read
Determine The Face Tilt Using OpenCV - PythonIn this article, we are going to see how to determine the face tilt using OpenCV in Python. To achieve this we will be using a popular computer vision library opencv-python. In this program with the help of the OpenCV library, we will detect faces in a live stream from a webcam or a video file and s
4 min read
How to add Google reCAPTCHA to Django forms ?We will learn how to integrate Google reCAPTCHA into our Django forms to protect our website from spam and automated bots. We'll cover everything from registering our site with Google, setting up the necessary keys in your Django project, to adding the reCAPTCHA widget in your forms and validating i
3 min read
E-commerce Website using DjangoThis project deals with developing a Virtual website âE-commerce Websiteâ. It provides the user with a list of the various products available for purchase in the store. For the convenience of online shopping, a shopping cart is provided to the user. After the selection of the goods, it is sent for t
11 min read
College Management System using Django - Python ProjectIn this article, we are going to build College Management System using Django and will be using dbsqlite database. In the times of covid, when education has totally become digital, there comes a need for a system that can connect teachers, students, and HOD and that was the motivation behind buildin
15+ min read
Create Word Counter App using DjangoOur task is to build a simple Django application that counts the number of words in a given text. This is a great beginner project if you have some basic knowledge of Django.Refer to the below article to know about basics of Django.Django BasicsHow to Create a Basic Project using MVT in Django ?Step
3 min read
Python Text to Speech and Vice-Versa
Speak the meaning of the word using PythonThe following article shows how by the use of two modules named, pyttsx3 and PyDictionary, we can make our system say out the meaning of the word given as input. It is module which speak the meaning when we want to have the meaning of the particular word. Modules neededPyDictionary: It is a Dictiona
2 min read
Convert PDF File Text to Audio Speech using PythonLet us see how to read a PDF that is converting a textual PDF file into audio.Packages Used:pyttsx3: It is a Python library for Text to Speech. It has many functions which will help the machine to communicate with us. It will help the machine to speak to usPyPDF2: It will help to the text from the P
2 min read
Speech Recognition in Python using Google Speech APISpeech recognition means converting spoken words into text. It used in various artificial intelligence applications such as home automation, speech to text, etc. In this article, youâll learn how to do basic speech recognition in Python using the Google Speech Recognition API.Step 1: Install Require
2 min read
Convert Text to Speech in PythonThere are several APIs available to convert text to speech in Python. One of such APIs is the Google Text to Speech API commonly known as the gTTS API. gTTS is a very easy to use tool which converts the text entered, into audio which can be saved as a mp3 file. The gTTS API supports several language
4 min read
Python Text To Speech | pyttsx modulepyttsx is a cross-platform text to speech library which is platform independent. The major advantage of using this library for text-to-speech conversion is that it works offline. However, pyttsx supports only Python 2.x. Hence, we will see pyttsx3 which is modified to work on both Python 2.x and Pyt
2 min read
Python: Convert Speech to text and text to SpeechSpeech Recognition is an important feature in several applications used such as home automation, artificial intelligence, etc. This article aims to provide an introduction on how to make use of the SpeechRecognition and pyttsx3 library of Python.Installation required: Python Speech Recognition modul
3 min read
Personal Voice Assistant in PythonAs we know Python is a suitable language for script writers and developers. Let's write a script for Personal Voice Assistant using Python. The query for the assistant can be manipulated as per the user's need. The implemented assistant can open up the application (if it's installed in the system),
6 min read
Build a Virtual Assistant Using PythonVirtual desktop assistant is an awesome thing. If you want your machine to run on your command like Jarvis did for Tony. Yes it is possible. It is possible using Python. Python offers a good major library so that we can use it for making a virtual assistant. Windows has Sapi5 and Linux has Espeak wh
8 min read
Python | Create a simple assistant using Wolfram Alpha API.The Wolfram|Alpha Webservice API provides a web-based API allowing the computational and presentation capabilities of Wolfram|Alpha to be integrated into web, mobile, desktop, and enterprise applications. Wolfram Alpha is an API which can compute expert-level answers using Wolframâs algorithms, know
2 min read
Voice Assistant using pythonSpeech recognition is the process of turning spoken words into text. It is a key part of any voice assistant. In Python the SpeechRecognition module helps us do this by capturing audio and converting it to text. In this guide weâll create a basic voice assistant using Python.Step 1: Install Required
3 min read
Voice search Wikipedia using PythonEvery day, we visit so many applications, be it messaging platforms like Messenger, Telegram or ordering products on Amazon, Flipkart, or knowing about weather and the list can go on. And we see that these websites have their own software program for initiating conversations with human beings using
5 min read
Language Translator Using Google API in PythonAPI stands for Application Programming Interface. It acts as an intermediate between two applications or software. In simple terms, API acts as a messenger that takes your request to destinations and then brings back its response for you. Google API is developed by Google to allow communications wit
3 min read
How to make a voice assistant for E-mail in Python?As we know, emails are very important for communication as each professional communication can be done by emails and the best service for sending and receiving mails is as we all know GMAIL. Gmail is a free email service developed by Google. Users can access Gmail on the web and using third-party pr
9 min read
Voice Assistant for Movies using PythonIn this article, we will see how a voice assistant can be made for searching for movies or films. After giving input as movie name in audio format and it will give the information about that movie in audio format as well. As we know the greatest searching website for movies is IMDb. IMDb is an onlin
6 min read