How To Make A Progress Bar in Python with Source Code

In this article you can learn the step by step process on How To Make A Progress Bar in Python, This project was created in Python Programming Language using PyCharm IDE.

The Progress Bar in Python is created using Graphical User Interface (GUI). This simple project is easy to understand and also this tutorial is good for the beginners or the students who wants to learn programming, specially Python Programming Language.

Project Information’s

Project Name:Progress Bar In Python
Language/s Used:Python (GUI) Based
Python version (Recommended):2.x or 3.x
Database:None
Type:Python App
Developer:IT SOURCECODE
Updates:0
How To Make A Progress Bar In Python – Project Information

About The Project

A Progress Bar tutorial teach you on How To Show Progress Bar In Python, In this code, we have declared a loop that will run 5 times. this loop will keep on updating the progress bar value with 20.

Every time loop will run, it will update the value of the Label. ws.update_idletasks() is used so that we can see the progress. Otherwise, it will quickly happen. there is a gap of 1 second every time the loop is run.

This Python Tkinter Progress bar also includes a downloadable Simple Project With Source Code for free, just find the downloadable source code below and click to start downloading.

By the way if you are new to python programming and you don’t know what would be the the Python IDE to use, I have here a list of Best Python IDE for Windows, Linux, Mac OS that will suit for you.

I also have here How to Download and Install Latest Version of Python on Windows.

To start on how to make a progress bar, make sure that you have installed Python 3.9 and PyCharm in your computer.

How To Create Progress Bar in Python

Here’s the step by step process on how to create progress bar in python.

1. Install Libraries

First, Install all given required libraries.

from tkinter import *
from tkinter.ttk import Progressbar
import time

2. Use the time.sleep() Method

In this line of code we will use the time.sleep() method, to simulate a for loop that takes some time to execute.

def step():
    for i in range(5):
        ws.update_idletasks()
        pb['value'] += 20
        time.sleep(1)
        txt['text']=pb['value'],'%'

3. Create Progress Bar Interface

Next, let’s create an progress bar interface.

pb = Progressbar(
    ws,
    orient = HORIZONTAL,
    length = 100,
    mode = 'determinate'
    )

pb.place(x=40, y=20)

txt = Label(
    ws,
    text = '0%',
    bg = '#345',
    fg = '#fff'

)

txt.place(x=150 ,y=20 )

4. Create a Button

Lastly, let’s create a clickable button to start functioning the progress bar.

Button(
    ws,
    text='Start',
    command=step
).place(x=40, y=50)

Complete Source Code

from tkinter import *
from tkinter.ttk import Progressbar
import time


def step():
    for i in range(5):
        ws.update_idletasks()
        pb['value'] += 20
        time.sleep(1)
        txt['text']=pb['value'],'%'

ws = Tk()
ws.title('IT SOURCECODE')
ws.geometry('200x150')
ws.config(bg='#345')


pb = Progressbar(
    ws,
    orient = HORIZONTAL,
    length = 100,
    mode = 'determinate'
    )

pb.place(x=40, y=20)

txt = Label(
    ws,
    text = '0%',
    bg = '#345',
    fg = '#fff'

)

txt.place(x=150 ,y=20 )

Button(
    ws,
    text='Start',
    command=step
).place(x=40, y=50)

ws.mainloop()

Output

progress-bar-output
progress-bar-output

Steps on how to run the project

Time needed: 5 minutes

These are the steps on how to run Progress Bar In Python Tkinter With Source Code

  • Step 1: Download the given source code below.

    First, download the given source code below and unzip the source code.
    progress bar download source code

  • Step 2: Import the project to your PyCharm IDE.

    Next, import the source code you’ve download to your PyCharm IDE.
    progress bar open project

  • Step 3: Run the project.

    last, run the project with the command “py main.py”
    progress bar run project

Download Source Code below

Summary

This Project was developed using python programming, This Simple Project With Source Code created using Graphical User Interface (GUI).

This simple project is easy to understand and also this tutorial is good for the beginners or the students who wants to learn programming, specially Python Programming Language.

Inquiries

If you have any questions or suggestions about on How To Make A Progress Bar In Python With Source Code, please feel free to leave a comment below.

Technology stack and requirements

To run this Python project on your development machine, you need:

  • Python 3.10 or higher. Download from python.org or install via Anaconda if you prefer bundled packages.
  • pip package manager. Comes with Python. Used to install project dependencies from requirements.txt.
  • Virtual environment. Use venv or conda to isolate project dependencies from your global Python install.
  • VS Code or PyCharm. Free code editors with Python syntax highlighting, IntelliSense, and debugging.
  • Git. For version control and cloning source code repositories.

Installing the source code

  1. Download or clone the repository. Get the ZIP archive from the download link on this page and extract it.
  2. Create a virtual environment. Open a terminal in the project folder and run: python -m venv venv, then activate it (venv\Scripts\activate on Windows or source venv/bin/activate on Mac/Linux).
  3. Install dependencies. Run pip install -r requirements.txt to install all libraries the project needs.
  4. Configure environment variables. If the project uses API keys (OpenAI, Anthropic, database), create a .env file and set the required keys.
  5. Run the project. Follow the run command in the README (usually python main.py or streamlit run app.py).

Using this project for your BSIT capstone

  • Chapter 1 (Introduction). Discuss the real-world problem this system solves. Cite Philippine or international use cases where the manual process could be automated.
  • Chapter 2 (RRL). Compare your project against 5-10 similar published works. Cite ACM, IEEE, or arXiv papers for academic-standard sources.
  • Chapter 3 (Methodology). Document the model architecture, training data, hyperparameters, and evaluation metrics used.
  • Chapter 4 (Results). Report accuracy, precision, recall, F1-score, and confusion matrix. Screenshot the running app on real inputs.
  • Chapter 5 (Conclusion). Identify features for Version 2: better model, larger dataset, mobile deployment, or REST API.

Modules typical of How To Make A Progress Bar

  • Core Python logic. Main functions implementing the business logic of the system.
  • Data storage. SQLite for simple projects, PostgreSQL or MongoDB for larger data.
  • User interface. Tkinter for desktop, Streamlit for data dashboards, or Flask/FastAPI for web.
  • Input validation. Type checking and range validation before processing user data.
  • Reports. CSV or PDF export using pandas.to_csv() or ReportLab.
  • Testing. pytest unit tests covering core functions.

Common enhancements for capstone review

  • Add REST API. Convert desktop app to FastAPI service for mobile or web front-ends.
  • Multi-user support. Add login, roles, and per-user data isolation.
  • Cloud deployment. Deploy to Render, Railway, or Fly.io for public access.
  • Docker containerization. Package the app in Docker for portable deployment.

Frequently Asked Questions

What does this Python tutorial cover?

Focused Python language or library tutorial showing a single concept with working code. Use as building block when assembling a larger system.

What Python version and libraries does this project require?

Most projects in this batch use Python 3.10, 3.11, or 3.12 (avoid 3.13 until library wheels catch up). Standard libs: tkinter (built-in), sqlite3 (built-in). External: pip install pillow opencv-python pygame mysql-connector-python reportlab requests beautifulsoup4. Check the requirements.txt file (if included) for exact versions.

How do I set up the database for this Python project?

For SQLite (most common, no setup needed): the .db file auto-creates on first run. For MySQL: install MySQL Server + MySQL Workbench, create an empty database, import the included .sql file, edit the connection string in db.py (or db_connect.py) with your host, user, password, database name.

Can I use this Python project for a BSIT capstone or thesis?

Yes. Python is rising fast in Philippine BSIT panels. Extend it: add user roles via auth module, dashboards (matplotlib charts), PDF reports (reportlab), email notifications (smtplib), real domain extension (analytics, audit log, multi-branch support). Pair with Chapter 1-5 documentation matching your panel’s rubric.

Why am I getting ‘ModuleNotFoundError’ or ‘No module named X’?

Three common Python issues: (1) Module not installed: pip install (use pip3 on macOS/Linux). (2) Wrong virtualenv: activate the project’s venv before running (python -m venv venv then venv\Scripts\activate on Windows or source venv/bin/activate on Linux/macOS). (3) Python 2 vs Python 3 mismatch: ensure you run python3 main.py not python main.py if both are installed.

Where can I find more Python projects with source code?

Browse the Python Projects hub for the full library. For computer vision specifically see OpenCV Projects (46 vision systems). For ML / AI capstones see Machine Learning Projects. For BSIT capstone idea lists see 150 Best Capstone Project Ideas.

Angel Jude Suarez


Full-Stack Developer at PIES IT Solution

Focuses on Python development, machine learning, and AI integration. Has built production AI systems including OpenAI Whisper integration for medical transcription and GPT-4o-powered diagnosis assistance. Strong background in pandas, scikit-learn, and TensorFlow.

Expertise: Python · PHP · Java · VB.NET · ASP.NET · Machine Learning · AI Integration · OpenCV · Django · CodeIgniter
 · View all posts by Angel Jude Suarez →

Leave a Comment