portfolio generator tool in python using GUI

introduction
In today’s digital-first world, having a personal portfolio is essential for students, job seekers, and professionals alike. A portfolio not only showcases your skills, projects, and background, but also reflects your ability to present yourself clearly and professionally. The Portfolio Generator tool in python created using Python’s Tkinter GUI and designed to run in Jupyter Notebook offers an easy and interactive way for users to build and preview their portfolio on the fly.
This GUI-based tool allows users to enter key personal details such as their name, bio, skillset, and project highlights—all within a clean, modern interface. With just a single click, it generates a well-formatted portfolio generator tool in python preview, complete with emojis, bullet points, and structured layout—mimicking what a basic online resume or about-me section might look like.
Purpose & Utility
This tool is perfect for:
Students building their first personal profile
Developers preparing quick showcase templates
Instructors teaching GUI + string formatting in Python
Anyone wanting a lightweight, quick-to-build text-based portfolio
What Makes It Special?
No need for HTML or design tools—pure Python GUI!
Instantly formats all details into a readable portfolio section.
Supports multiple-line input for skills and projects.
Stylish UI with emojis, background color, and layout controls
Lightweight and runs directly inside Jupyter Notebook
Educational Value
From a learning perspective, this project is a hands-on introduction to:
Building forms with
Tkinter
(usingEntry
andText
)Collecting and validating user input
Processing and formatting text dynamically
Working with layout managers (
grid
,pack
)Enhancing GUI appearance using font, color, and structure
Practical Extension Ideas
This tool can be expanded further into a professional-grade application:
Export the portfolio to
.txt
,.pdf
, or.html
Add image/logo/resume upload features
Include social links (GitHub, LinkedIn, etc.)
Save profiles for multiple users
Convert into a static website template generator
This Portfolio Generator in python using GUI is a compact but powerful starter tool that combines form inputs, formatting logic, and real-time display—all inside a friendly and interactive GUI. Whether you’re using it to practice your Python GUI skills or to create your own resume section quickly, this app serves as an effective launchpad into both programming and personal branding.
steps to create portfolio generator
Step 1: Open Jupyter Notebook
-
Launch Jupyter Notebook from Anaconda, terminal, or VSCode.
-
Create a new
.ipynb
file.
Step 2: Import Required Libraries
import tkinter as tk
from tkinter import messagebox
-
tkinter
: Used to create GUI components (window, labels, buttons, text areas). -
messagebox
: Used to show popup alerts (e.g., if name or bio is missing).
Step 3: Define the Portfolio Generator tool in python Function
def generate_portfolio():
...
Inside this function:
-
Collect input from Entry and Text widgets.
-
Format the inputs into a clean portfolio preview using
f-strings
. -
Insert formatted text into a read-only
Text
widget for output.
Use:
.get() → For single-line Entry (name)
.get("1.0", END) → For multi-line Text (bio, skills, projects)
Step 4: Create Main Window (root)
root = tk.Tk()
root.title("Portfolio Generator")
root.geometry("600x600")
root.configure(bg="#f7f9fc")
-
Initializes the main GUI window.
-
Sets window title, size, and background color.
Step 5: Add Heading Label
tk.Label(root, text="Portfolio Generator Tool", font=("Helvetica", 18, "bold"), ...).pack(pady=10)
-
Adds a bold header for the application.
Step 6: Create Input Form in Frame
frame = tk.Frame(root, bg="#f7f9fc")
frame.pack(pady=5)
Inside this frame, create labeled input fields:
Field | Widget Used |
---|---|
Name | tk.Entry() |
Bio | tk.Text() |
Skills | tk.Text() |
Projects | tk.Text() |
Each Text
widget allows multi-line input (one skill/project per line).
Step 7: Add Generate Button
tk.Button(root, text=" Generate Portfolio", command=generate_portfolio, ...).pack(pady=10)
-
Calls
generate_portfolio()
when clicked. -
Styled with background color, font, and spacing.
Step 8: Create Output Box
output_box = tk.Text(root, height=15, width=70, font=("Courier", 10), ...)
output_box.pack(pady=10)
output_box.config(state='disabled')
-
Displays the final formatted portfolio.
-
Set to read-only using
.config(state='disabled')
to prevent user edits.
Step 9: Run the App
root.mainloop()
-
Starts the Tkinter event loop.
-
Keeps the window active and responsive until closed manually
code explanation
Step 1: Import Required Libraries
import tkinter as tk
from tkinter import messagebox
tkinter
: Used to create the graphical interface (buttons, inputs, labels).messagebox
: Provides popup dialogs (e.g., for empty input errors).
Step 2: Define Function to Generate Portfolio
def generate_portfolio():
Starts the function that collects input, formats it, and displays the result.
name = name_entry.get()
bio = bio_entry.get("1.0", tk.END).strip()
skills = skills_entry.get("1.0", tk.END).strip().split('\n')
projects = projects_entry.get("1.0", tk.END).strip().split('\n')
name_entry.get()
: Gets the name from the entry field.Text.get("1.0", tk.END)
: Gets multi-line text (from Bio, Skills, Projects)..strip()
: Removes leading/trailing whitespace..split('\n')
: Converts multi-line skills/projects into a list.
if not name or not bio:
messagebox.showerror("Input Error", "Name and Bio are required.")
return
Ensures name and bio are not empty.
Shows a popup if either is missing.
output = f"📄 PORTFOLIO\n\n Name: {name}\n\n Bio:\n{bio}\n\n Skills:\n"
output += '\n'.join([f"{skill}" for skill in skills if skill]) + "\n\n Projects:\n"
output += '\n'.join([f" {proj}" for proj in projects if proj])
Creates the formatted portfolio preview using:
List items (•)
Loops through non-empty skills/projects to format each line.
output_box.config(state='normal')
output_box.delete("1.0", tk.END)
output_box.insert(tk.END, output)
output_box.config(state='disabled')
Enables editing of output box → clears it → inserts new content → disables it again to make it read-only.
Step 3: Build the GUI Interface
root = tk.Tk()
root.title("Portfolio Generator")
root.geometry("600x600")
root.configure(bg="#f7f9fc")
Creates the main window.
Sets a light blue background and fixed window size.
Step 4: Header Label
tk.Label(root, text="Portfolio Generator Tool", font=("Helvetica", 18, "bold"), bg="#f7f9fc", fg="#2c3e50").pack(pady=10)
Displays the app title in bold at the top.
Step 5: Create Input Frame
frame = tk.Frame(root, bg="#f7f9fc")
frame.pack(pady=5)
Adds a frame (container) to organize the input form.
Step 6: Add Input Fields
tk.Label(...).grid(...) # Creates labels (Name, Bio, Skills, Projects)
tk.Entry(...).grid(...) # Single-line input (Name)
tk.Text(...).grid(...) # Multi-line input (Bio, Skills, Projects)
Bio, Skills, and Projects are Text widgets for multiline input.
Skills and Projects support line-by-line entry.
Step 7: Add Generate Button
tk.Button(root, text=" Generate Portfolio", command=generate_portfolio, bg="#3498db", fg="white", font=("Arial", 12)).pack(pady=10)
When clicked, this button calls
generate_portfolio()
to process inputs and generate output.
Step 8: Output Display
output_box = tk.Text(root, height=15, width=70, font=("Courier", 10), bd=2, relief="groove", bg="#ffffff")
output_box.pack(pady=10)
output_box.config(state='disabled')
Text widget for displaying the formatted portfolio.
Uses a monospaced font (
Courier
) for clean formatting.Set as read-only to avoid accidental editing.
Step 9: Run the Application
root.mainloop()
Starts the event loop.
Keeps the GUI running until manually closed.
Summary of Features
Feature | Purpose |
---|---|
Input fields | Enter Name, Bio, Skills, Projects |
Styled GUI | Modern fonts, emojis, colors |
Validation | Name & bio required |
Portfolio Output | Formatted preview with list-style bullets |
source code
import tkinter as tk
from tkinter import messagebox
def generate_portfolio():
name = name_entry.get()
bio = bio_entry.get("1.0", tk.END).strip()
skills = skills_entry.get("1.0", tk.END).strip().split('\n')
projects = projects_entry.get("1.0", tk.END).strip().split('\n')
if not name or not bio:
messagebox.showerror("Input Error", "Name and Bio are required.")
return
output = f"📄 PORTFOLIO\n\n Name: {name}\n\n Bio:\n{bio}\n\n🛠 Skills:\n"
output += '\n'.join([f"• {skill}" for skill in skills if skill]) + "\n\n Projects:\n"
output += '\n'.join([f"• {proj}" for proj in projects if proj])
output_box.config(state='normal')
output_box.delete("1.0", tk.END)
output_box.insert(tk.END, output)
output_box.config(state='disabled')
# GUI Setup
root = tk.Tk()
root.title("Portfolio Generator")
root.geometry("600x600")
root.configure(bg="#f7f9fc")
tk.Label(root, text="Portfolio Generator Tool", font=("Helvetica", 18, "bold"), bg="#f7f9fc", fg="#2c3e50").pack(pady=10)
frame = tk.Frame(root, bg="#f7f9fc")
frame.pack(pady=5)
tk.Label(frame, text=" Name:", bg="#f7f9fc").grid(row=0, column=0, sticky='e')
name_entry = tk.Entry(frame, width=40)
name_entry.grid(row=0, column=1, padx=10, pady=5)
tk.Label(frame, text=" Bio:", bg="#f7f9fc").grid(row=1, column=0, sticky='ne')
bio_entry = tk.Text(frame, width=30, height=3)
bio_entry.grid(row=1, column=1, padx=10, pady=5)
tk.Label(frame, text=" Skills (one per line):", bg="#f7f9fc").grid(row=2, column=0, sticky='ne')
skills_entry = tk.Text(frame, width=30, height=4)
skills_entry.grid(row=2, column=1, padx=10, pady=5)
tk.Label(frame, text=" Projects (one per line):", bg="#f7f9fc").grid(row=3, column=0, sticky='ne')
projects_entry = tk.Text(frame, width=30, height=4)
projects_entry.grid(row=3, column=1, padx=10, pady=5)
tk.Button(root, text=" Generate Portfolio", command=generate_portfolio, bg="#3498db", fg="white", font=("Arial", 12)).pack(pady=10)
output_box = tk.Text(root, height=15, width=70, font=("Courier", 10), bd=2, relief="groove", bg="#ffffff")
output_box.pack(pady=10)
output_box.config(state='disabled')
root.mainloop()
output



More java Pojects
Get Huge Discounts
Get Discount on Top EdTech Compnies
console.log( 'Code is Poetry' );