September 27, 2026
10 Python Libraries That Turn Raw Business Data Into Instant Websites, Maps, And Reports
No accounts, no API keys, no waiting on anyone’s approval. Every single one of these runs the moment you hit enter in your own terminal…

By Abdul Ahad
10 min read
No accounts, no API keys, no waiting on anyone's approval. Every single one of these runs the moment you hit enter in your own terminal, and I tested every one before writing a word.
"Want to get started with Python from beginning to Expert?" click here"
or
"Want a pack of prompts that work for you and save hours? click here"
_Non-Member? Read it for free _Here.
Have you ever wished you could hand a script a spreadsheet of your sales, inventory, or store locations, and get back an actual website, map, or presentation instead of just more numbers?
That's the entire theme this time. Ten libraries, zero external accounts required, every one runs completely offline on your own machine the instant you type the command. I ran every single example below myself, real files came out of all ten.
1. Streamlit: Your Data Becomes A Real Website In One Command
Turns a plain Python script into a genuine, interactive website running in your browser, no HTML or JavaScript required.
Docs: docs.streamlit.io
# pip install streamlit
# save this as streamlit_app.py
import streamlit as st
import pandas as pd
st.title("Jackets Sales Dashboard")
data = pd.DataFrame({
"Product": ["Midnight Bomber", "Concrete Trench", "Ashfield Puffer"],
"Units Sold": [42, 18, 27],
"Revenue": [7938, 4122, 6723],
})
st.dataframe(data)
st.bar_chart(data.set_index("Product")["Revenue"])
selected = st.selectbox("Choose a product", data["Product"])
st.write(f"You selected: {selected}")
total_revenue = data["Revenue"].sum()
st.metric("Total Revenue", f"${total_revenue:,}")# pip install streamlit
# save this as streamlit_app.py
import streamlit as st
import pandas as pd
st.title("Jackets Sales Dashboard")
data = pd.DataFrame({
"Product": ["Midnight Bomber", "Concrete Trench", "Ashfield Puffer"],
"Units Sold": [42, 18, 27],
"Revenue": [7938, 4122, 6723],
})
st.dataframe(data)
st.bar_chart(data.set_index("Product")["Revenue"])
selected = st.selectbox("Choose a product", data["Product"])
st.write(f"You selected: {selected}")
total_revenue = data["Revenue"].sum()
st.metric("Total Revenue", f"${total_revenue:,}")Run it with one line in your terminal.
streamlit run streamlit_app.pystreamlit run streamlit_app.pyI ran this exact command myself and confirmed the server actually comes up, a real HTTP request to
localhost:8501returned a clean 200 response. A dropdown, a live bar chart, and a real metric card, an actual working website, from a file with no HTML in it at all.
What's happening:
A data table, a live bar chart, a working dropdown, and a revenue metric card are all rendered from plain Python no separate frontend code, just
st.dataframe(),st.bar_chart(),st.selectbox(), andst.metric()calls turning data directly into a real website.
Stay Ahead in Python — Without the Noise 🐍 Click here to Join!
Python Weekly Brief Stop Wasting Hours Hunting for Python ResourcesEvery week, thousands of new Python libraries, AI frameworks, GitHub…
2. Graphviz: Turning A Process Into A Real Flowchart
Draws an actual flowchart image from plain text descriptions of steps and decisions.
Docs: graphviz.readthedocs.io
# pip install graphviz
# also needs the graphviz system package: sudo apt install graphviz
import graphviz
dot = graphviz.Digraph("OrderWorkflow", format="png")
dot.attr(rankdir="LR", bgcolor="white")
dot.attr("node", shape="box", style="rounded,filled", fillcolor="#1a1a2e", fontcolor="white", fontname="Helvetica")
steps = [
("order_placed", "Order Placed"),
("payment_check", "Payment Verified"),
("inventory_check", "Inventory Checked"),
("packed", "Item Packed"),
("shipped", "Shipped"),
("delivered", "Delivered"),
]
for node_id, label in steps:
dot.node(node_id, label)
dot.edge("order_placed", "payment_check")
dot.edge("payment_check", "inventory_check", label="if paid")
dot.edge("payment_check", "order_placed", label="if failed", color="red", fontcolor="red")
dot.edge("inventory_check", "packed", label="in stock")
dot.edge("inventory_check", "order_placed", label="out of stock", color="red", fontcolor="red")
dot.edge("packed", "shipped")
dot.edge("shipped", "delivered")
output_path = dot.render("order_workflow", cleanup=True)
print("Saved:", output_path)# pip install graphviz
# also needs the graphviz system package: sudo apt install graphviz
import graphviz
dot = graphviz.Digraph("OrderWorkflow", format="png")
dot.attr(rankdir="LR", bgcolor="white")
dot.attr("node", shape="box", style="rounded,filled", fillcolor="#1a1a2e", fontcolor="white", fontname="Helvetica")
steps = [
("order_placed", "Order Placed"),
("payment_check", "Payment Verified"),
("inventory_check", "Inventory Checked"),
("packed", "Item Packed"),
("shipped", "Shipped"),
("delivered", "Delivered"),
]
for node_id, label in steps:
dot.node(node_id, label)
dot.edge("order_placed", "payment_check")
dot.edge("payment_check", "inventory_check", label="if paid")
dot.edge("payment_check", "order_placed", label="if failed", color="red", fontcolor="red")
dot.edge("inventory_check", "packed", label="in stock")
dot.edge("inventory_check", "order_placed", label="out of stock", color="red", fontcolor="red")
dot.edge("packed", "shipped")
dot.edge("shipped", "delivered")
output_path = dot.render("order_workflow", cleanup=True)
print("Saved:", output_path)I ran this and opened the actual PNG afterward, a clean, genuinely professional looking flowchart, boxes, arrows, and red failure paths exactly where they belong, generated entirely from six lines describing steps.
What's happening:
Six process steps became boxes connected by arrows, with red-labeled paths marking failure branches ("if failed", "out of stock") looping back to the start all rendered automatically from a short list of node names and edge connections, no manual drawing involved.
3. Networkx: Mapping And Analyzing Real Business Relationships
Builds a real graph of how things in your business connect, then lets you ask genuine questions about it, like which node matters most.
Docs: networkx.org
# pip install networkx matplotlib
import networkx as nx
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
G = nx.DiGraph()
suppliers = ["Fabric Supplier A", "Fabric Supplier B", "Zipper Supplier"]
factories = ["Factory Karachi", "Factory Lahore"]
warehouses = ["Warehouse East", "Warehouse West"]
retailers = ["Online Store", "Retail Partner 1", "Retail Partner 2"]
for s in suppliers:
for f in factories:
G.add_edge(s, f)
for f in factories:
for w in warehouses:
G.add_edge(f, w)
for w in warehouses:
for r in retailers:
G.add_edge(w, r)
print("Total nodes in supply chain:", G.number_of_nodes())
print("Total connections:", G.number_of_edges())
most_connected = max(G.nodes, key=lambda n: G.degree(n))
print(f"Most connected node: {most_connected} (degree {G.degree(most_connected)})")
paths = list(nx.all_simple_paths(G, "Fabric Supplier A", "Online Store"))
print(f"Possible paths from Fabric Supplier A to Online Store: {len(paths)}")
plt.figure(figsize=(12, 6))
pos = nx.spring_layout(G, seed=42)
colors = ["#e07a3f" if n in suppliers else "#3f7ae0" if n in factories else "#3fe07a" if n in warehouses else "#e03f7a" for n in G.nodes]
nx.draw(G, pos, with_labels=True, node_color=colors, node_size=2000, font_size=7, arrows=True)
plt.title("Supply Chain Network")
plt.savefig("supply_chain.png", bbox_inches="tight", dpi=100)
print("Saved supply_chain.png")# pip install networkx matplotlib
import networkx as nx
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
G = nx.DiGraph()
suppliers = ["Fabric Supplier A", "Fabric Supplier B", "Zipper Supplier"]
factories = ["Factory Karachi", "Factory Lahore"]
warehouses = ["Warehouse East", "Warehouse West"]
retailers = ["Online Store", "Retail Partner 1", "Retail Partner 2"]
for s in suppliers:
for f in factories:
G.add_edge(s, f)
for f in factories:
for w in warehouses:
G.add_edge(f, w)
for w in warehouses:
for r in retailers:
G.add_edge(w, r)
print("Total nodes in supply chain:", G.number_of_nodes())
print("Total connections:", G.number_of_edges())
most_connected = max(G.nodes, key=lambda n: G.degree(n))
print(f"Most connected node: {most_connected} (degree {G.degree(most_connected)})")
paths = list(nx.all_simple_paths(G, "Fabric Supplier A", "Online Store"))
print(f"Possible paths from Fabric Supplier A to Online Store: {len(paths)}")
plt.figure(figsize=(12, 6))
pos = nx.spring_layout(G, seed=42)
colors = ["#e07a3f" if n in suppliers else "#3f7ae0" if n in factories else "#3fe07a" if n in warehouses else "#e03f7a" for n in G.nodes]
nx.draw(G, pos, with_labels=True, node_color=colors, node_size=2000, font_size=7, arrows=True)
plt.title("Supply Chain Network")
plt.savefig("supply_chain.png", bbox_inches="tight", dpi=100)
print("Saved supply_chain.png")Real output:
Total nodes in supply chain: 10
Total connections: 16
Most connected node: Factory Karachi (degree 5)
Possible paths from Fabric Supplier A to Online Store: 4Total nodes in supply chain: 10
Total connections: 16
Most connected node: Factory Karachi (degree 5)
Possible paths from Fabric Supplier A to Online Store: 4That's not decoration, that's a real answer to a real business question, exactly one factory is your single point of failure if it goes down, and there are exactly four different routes a product could take to reach your online store.
Python Weekly Brief Stop Wasting Hours Hunting for Python ResourcesEvery week, thousands of new Python libraries, AI frameworks, GitHub…
4. Folium: Turning Store Locations Into A Real Interactive Map
Builds an actual, clickable map in a real HTML file, pins, popups, and all, from nothing but latitude and longitude.
Docs: python-visualization.github.io/folium
# pip install folium
import folium
store_locations = [
{"name": "Flagship Store - Lahore", "lat": 31.5497, "lon": 74.3436, "sales": 45000},
{"name": "Branch - Karachi", "lat": 24.8607, "lon": 67.0011, "sales": 38000},
{"name": "Branch - Islamabad", "lat": 33.6844, "lon": 73.0479, "sales": 29000},
{"name": "Warehouse - Faisalabad", "lat": 31.4504, "lon": 73.1350, "sales": 0},
]
center_lat = sum(s["lat"] for s in store_locations) / len(store_locations)
center_lon = sum(s["lon"] for s in store_locations) / len(store_locations)
business_map = folium.Map(location=[center_lat, center_lon], zoom_start=6)
for store in store_locations:
color = "green" if store["sales"] > 40000 else "orange" if store["sales"] > 0 else "gray"
icon = "shopping-cart" if store["sales"] > 0 else "warehouse"
popup_text = (
f"<b>{store['name']}</b><br>Monthly sales: ${store['sales']:,}"
if store["sales"] > 0 else f"<b>{store['name']}</b><br>Distribution center"
)
folium.Marker(
location=[store["lat"], store["lon"]],
popup=folium.Popup(popup_text, max_width=250),
tooltip=store["name"],
icon=folium.Icon(color=color, icon=icon, prefix="fa"),
).add_to(business_map)
total_sales = sum(s["sales"] for s in store_locations)
business_map.save("store_locations_map.html")
print(f"Saved store_locations_map.html, total network sales: ${total_sales:,}")# pip install folium
import folium
store_locations = [
{"name": "Flagship Store - Lahore", "lat": 31.5497, "lon": 74.3436, "sales": 45000},
{"name": "Branch - Karachi", "lat": 24.8607, "lon": 67.0011, "sales": 38000},
{"name": "Branch - Islamabad", "lat": 33.6844, "lon": 73.0479, "sales": 29000},
{"name": "Warehouse - Faisalabad", "lat": 31.4504, "lon": 73.1350, "sales": 0},
]
center_lat = sum(s["lat"] for s in store_locations) / len(store_locations)
center_lon = sum(s["lon"] for s in store_locations) / len(store_locations)
business_map = folium.Map(location=[center_lat, center_lon], zoom_start=6)
for store in store_locations:
color = "green" if store["sales"] > 40000 else "orange" if store["sales"] > 0 else "gray"
icon = "shopping-cart" if store["sales"] > 0 else "warehouse"
popup_text = (
f"<b>{store['name']}</b><br>Monthly sales: ${store['sales']:,}"
if store["sales"] > 0 else f"<b>{store['name']}</b><br>Distribution center"
)
folium.Marker(
location=[store["lat"], store["lon"]],
popup=folium.Popup(popup_text, max_width=250),
tooltip=store["name"],
icon=folium.Icon(color=color, icon=icon, prefix="fa"),
).add_to(business_map)
total_sales = sum(s["sales"] for s in store_locations)
business_map.save("store_locations_map.html")
print(f"Saved store_locations_map.html, total network sales: ${total_sales:,}")I opened the generated file afterward, a genuinely real, pannable, zoomable map with colored pins, green for your best performing store, gray for the warehouse, each one clickable with real sales figures in the popup.
5. Plotly: A Real Interactive Business Dashboard
Builds genuinely interactive charts, hover, zoom, and toggle included, saved as a single HTML file anyone can open.
Docs: plotly.com/python
# pip install plotly
import plotly.graph_objects as go
from plotly.subplots import make_subplots
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
revenue = [12000, 15000, 11000, 18000, 22000, 25000]
costs = [8000, 9000, 8500, 10000, 11000, 12000]
profit = [r - c for r, c in zip(revenue, costs)]
fig = make_subplots(
rows=1, cols=2,
subplot_titles=("Revenue vs Costs", "Profit Trend"),
specs=[[{"type": "bar"}, {"type": "scatter"}]],
)
fig.add_trace(go.Bar(x=months, y=revenue, name="Revenue", marker_color="#3fe07a"), row=1, col=1)
fig.add_trace(go.Bar(x=months, y=costs, name="Costs", marker_color="#e03f7a"), row=1, col=1)
fig.add_trace(go.Scatter(x=months, y=profit, mode="lines+markers", name="Profit", line=dict(color="#e07a3f", width=3)), row=1, col=2)
fig.update_layout(title="Jackets Business Dashboard, First Half Year", template="plotly_dark")
fig.write_html("business_dashboard.html")
total_profit = sum(profit)
best_month = months[profit.index(max(profit))]
print(f"Total profit across six months: ${total_profit:,}")
print(f"Best performing month: {best_month} (${max(profit):,} profit)")# pip install plotly
import plotly.graph_objects as go
from plotly.subplots import make_subplots
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
revenue = [12000, 15000, 11000, 18000, 22000, 25000]
costs = [8000, 9000, 8500, 10000, 11000, 12000]
profit = [r - c for r, c in zip(revenue, costs)]
fig = make_subplots(
rows=1, cols=2,
subplot_titles=("Revenue vs Costs", "Profit Trend"),
specs=[[{"type": "bar"}, {"type": "scatter"}]],
)
fig.add_trace(go.Bar(x=months, y=revenue, name="Revenue", marker_color="#3fe07a"), row=1, col=1)
fig.add_trace(go.Bar(x=months, y=costs, name="Costs", marker_color="#e03f7a"), row=1, col=1)
fig.add_trace(go.Scatter(x=months, y=profit, mode="lines+markers", name="Profit", line=dict(color="#e07a3f", width=3)), row=1, col=2)
fig.update_layout(title="Jackets Business Dashboard, First Half Year", template="plotly_dark")
fig.write_html("business_dashboard.html")
total_profit = sum(profit)
best_month = months[profit.index(max(profit))]
print(f"Total profit across six months: ${total_profit:,}")
print(f"Best performing month: {best_month} (${max(profit):,} profit)")Real output:
Total profit across six months: $44,500
Best performing month: Jun ($13,000 profit)Total profit across six months: $44,500
Best performing month: Jun ($13,000 profit)Open the saved file and every bar and line actually responds to your mouse, hover over June and it tells you the exact number, not just a static picture pretending to be a dashboard.
What's happening:
Two linked charts sit side by side: a bar chart comparing revenue vs. costs month by month, and a line chart tracking profit both genuinely interactive, hover over any bar or point and it shows the exact number. The script also calculated the real numbers behind the chart directly: $44,500 total profit across six months, with June as the standout at $13,000.
Why this matters:
Unlike a static image pretending to be a dashboard, every bar and line here actually responds to the mouse zoom, hover, toggle a series on or off. That's a real, shareable interactive report from a single Python script, not a screenshot of one.
6. Python Pptx: Auto Generating A Real Presentation
Builds an actual PowerPoint file, titles, bullet points, and a native editable chart, entirely from Python.
Docs: python-pptx.readthedocs.io
# pip install python-pptx
from pptx import Presentation
from pptx.util import Inches
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Monthly Business Review"
slide.placeholders[1].text = "Automatically generated from live sales data"
slide2 = prs.slides.add_slide(prs.slide_layouts[1])
slide2.shapes.title.text = "Key Highlights"
body = slide2.placeholders[1].text_frame
body.text = "Total revenue: $103,000 across six months"
body.add_paragraph().text = "Total profit: $44,500"
body.add_paragraph().text = "Best month: June, with $13,000 profit"
slide3 = prs.slides.add_slide(prs.slide_layouts[5])
slide3.shapes.title.text = "Revenue By Month"
chart_data = CategoryChartData()
chart_data.categories = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
chart_data.add_series("Revenue", (12000, 15000, 11000, 18000, 22000, 25000))
slide3.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED, Inches(1), Inches(1.5), Inches(8), Inches(5), chart_data)
prs.save("monthly_review.pptx")
print("Saved monthly_review.pptx")# pip install python-pptx
from pptx import Presentation
from pptx.util import Inches
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Monthly Business Review"
slide.placeholders[1].text = "Automatically generated from live sales data"
slide2 = prs.slides.add_slide(prs.slide_layouts[1])
slide2.shapes.title.text = "Key Highlights"
body = slide2.placeholders[1].text_frame
body.text = "Total revenue: $103,000 across six months"
body.add_paragraph().text = "Total profit: $44,500"
body.add_paragraph().text = "Best month: June, with $13,000 profit"
slide3 = prs.slides.add_slide(prs.slide_layouts[5])
slide3.shapes.title.text = "Revenue By Month"
chart_data = CategoryChartData()
chart_data.categories = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
chart_data.add_series("Revenue", (12000, 15000, 11000, 18000, 22000, 25000))
slide3.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED, Inches(1), Inches(1.5), Inches(8), Inches(5), chart_data)
prs.save("monthly_review.pptx")
print("Saved monthly_review.pptx")I reopened this file with the same library right after saving it, confirmed three real slides, the correct title on the first one, and a genuine native chart on the third, not a picture of a chart, an actual editable PowerPoint chart object.
7. Statsmodels: Forecasting Where Your Numbers Are Actually Headed
Looks at your real historical numbers and calculates a genuine statistical forecast for what comes next.
Docs: statsmodels.org
# pip install statsmodels
import statsmodels.api as sm
historical_revenue = [12000, 13500, 12800, 15000, 16200, 15800, 17500, 18900, 18200, 20100, 21500, 22800]
model = sm.tsa.ExponentialSmoothing(historical_revenue, trend="add", seasonal=None).fit()
forecast = model.forecast(3)
print("Forecast for the next 3 months:", [round(f, 2) for f in forecast])
growth_rate = (historical_revenue[-1] - historical_revenue[0]) / historical_revenue[0] * 100
print(f"Growth over the past year: {growth_rate:.1f}%")# pip install statsmodels
import statsmodels.api as sm
historical_revenue = [12000, 13500, 12800, 15000, 16200, 15800, 17500, 18900, 18200, 20100, 21500, 22800]
model = sm.tsa.ExponentialSmoothing(historical_revenue, trend="add", seasonal=None).fit()
forecast = model.forecast(3)
print("Forecast for the next 3 months:", [round(f, 2) for f in forecast])
growth_rate = (historical_revenue[-1] - historical_revenue[0]) / historical_revenue[0] * 100
print(f"Growth over the past year: {growth_rate:.1f}%")Real output:
Forecast for the next 3 months: [23109.11, 24045.13, 24981.14]
Growth over the past year: 90.0%Forecast for the next 3 months: [23109.11, 24045.13, 24981.14]
Growth over the past year: 90.0%That's a genuine trend based forecast, not a guess, the model actually fit a real trend line to twelve months of data and projected it forward. Feed it your own last twelve months of revenue and get your own real numbers back.
8. Dtale: Turning A Spreadsheet Into A Full Interactive Web App
Takes a plain dataframe and instantly launches a complete, sortable, filterable web app around it, no code beyond one line.
Docs: github.com/man-group/dtale
# pip install dtale
import dtale
import pandas as pd
import numpy as np
np.random.seed(42)
df = pd.DataFrame({
"product": ["Midnight Bomber", "Concrete Trench", "Ashfield Puffer", "Static Denim"] * 25,
"units_sold": np.random.randint(1, 20, 100),
"revenue": np.random.uniform(50, 300, 100).round(2),
})
d = dtale.show(df)
print(f"Your data is now live at: {d._url}")
input("Press enter to shut it down...")
d.kill()# pip install dtale
import dtale
import pandas as pd
import numpy as np
np.random.seed(42)
df = pd.DataFrame({
"product": ["Midnight Bomber", "Concrete Trench", "Ashfield Puffer", "Static Denim"] * 25,
"units_sold": np.random.randint(1, 20, 100),
"revenue": np.random.uniform(50, 300, 100).round(2),
})
d = dtale.show(df)
print(f"Your data is now live at: {d._url}")
input("Press enter to shut it down...")
d.kill()I confirmed this genuinely spins up a real local web server the moment dtale.show() runs, a real URL printed back, ready to open in any browser with sorting, filtering, and column statistics built in automatically, none of which you had to code yourself.
What's happening:
One line,
dtale.show(df), spun up a real local web server and returned a genuine URL opening it shows the full dataset as a sortable, filterable table with built-in column statistics, all generated automatically with zero frontend code written.
Python Weekly Brief Stop Wasting Hours Hunting for Python ResourcesEvery week, thousands of new Python libraries, AI frameworks, GitHub…
9. Pyvis: A Network Graph You Can Actually Drag Around
Turns a network of connections into a real, interactive HTML page where you physically drag nodes apart with your mouse.
Docs: pyvis.readthedocs.io
# pip install pyvis networkx
from pyvis.network import Network
import networkx as nx
G = nx.DiGraph()
G.add_edge("Fabric Supplier", "Factory")
G.add_edge("Zipper Supplier", "Factory")
G.add_edge("Factory", "Warehouse")
G.add_edge("Warehouse", "Online Store")
G.add_edge("Warehouse", "Retail Partner")
net = Network(height="600px", width="100%", directed=True, bgcolor="#1a1a2e", font_color="white")
net.from_nx(G)
net.save_graph("interactive_supply_chain.html")
print("Saved interactive_supply_chain.html")# pip install pyvis networkx
from pyvis.network import Network
import networkx as nx
G = nx.DiGraph()
G.add_edge("Fabric Supplier", "Factory")
G.add_edge("Zipper Supplier", "Factory")
G.add_edge("Factory", "Warehouse")
G.add_edge("Warehouse", "Online Store")
G.add_edge("Warehouse", "Retail Partner")
net = Network(height="600px", width="100%", directed=True, bgcolor="#1a1a2e", font_color="white")
net.from_nx(G)
net.save_graph("interactive_supply_chain.html")
print("Saved interactive_supply_chain.html")Confirmed this generates a real, working HTML file with the actual vis.js interactive graph library embedded inside it, open it and every node can genuinely be clicked and dragged to a new position, unlike the static NetworkX image from earlier.
What's happening:
The same kind of supply-chain connections shown earlier as a static NetworkX image are here rendered with the
vis.jslibrary embedded directly in the page every node can actually be clicked and dragged to a new position with the mouse, with connections following along in real time.
Why this matters:
A static graph image is fine for a report, but a genuinely explorable one where you can physically rearrange nodes to untangle a messy network makes patterns easier to spot by hand. This turns any NetworkX graph into that kind of interactive page with just a few extra lines.
10. Reportlab: A Polished PDF Report, Built From Nothing But Data
Generates an actual, professional looking PDF, styled tables included, entirely from Python, no Word or design software involved.
Docs: docs.reportlab.com
# pip install reportlab
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet
styles = getSampleStyleSheet()
story = [
Paragraph("Monthly Business Report", styles["Title"]),
Spacer(1, 20),
Paragraph("Generated automatically from live sales data.", styles["Normal"]),
Spacer(1, 20),
]
data = [
["Month", "Revenue", "Costs", "Profit"],
["Jan", "$12,000", "$8,000", "$4,000"],
["Feb", "$15,000", "$9,000", "$6,000"],
["Mar", "$11,000", "$8,500", "$2,500"],
]
table = Table(data)
table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#1a1a2e")),
("TEXTCOLOR", (0, 0), (-1, 0), colors.white),
("GRID", (0, 0), (-1, -1), 0.5, colors.grey),
]))
story.append(table)
doc = SimpleDocTemplate("business_report.pdf", pagesize=letter)
doc.build(story)
print("Saved business_report.pdf")# pip install reportlab
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet
styles = getSampleStyleSheet()
story = [
Paragraph("Monthly Business Report", styles["Title"]),
Spacer(1, 20),
Paragraph("Generated automatically from live sales data.", styles["Normal"]),
Spacer(1, 20),
]
data = [
["Month", "Revenue", "Costs", "Profit"],
["Jan", "$12,000", "$8,000", "$4,000"],
["Feb", "$15,000", "$9,000", "$6,000"],
["Mar", "$11,000", "$8,500", "$2,500"],
]
table = Table(data)
table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#1a1a2e")),
("TEXTCOLOR", (0, 0), (-1, 0), colors.white),
("GRID", (0, 0), (-1, -1), 0.5, colors.grey),
]))
story.append(table)
doc = SimpleDocTemplate("business_report.pdf", pagesize=letter)
doc.build(story)
print("Saved business_report.pdf")I reopened this exact PDF afterward and pulled the text back out to confirm it, a genuine single page report with a styled dark header row, ready to attach directly to an email.
What's happening:
A title, a summary line, and a data table with a dark styled header row were all placed programmatically, producing a genuine single-page PDF report ready to attach directly to an email.
Why this matters:
This is the same underlying pattern behind the invoice example from earlier in the series, but as a clean, professional report layout proving that styled, presentation-ready PDFs don't require Word, InDesign, or any manual formatting, just data and a bit of Python.
Stay Ahead in Python — Without the Noise 🐍 Click here to Join!
Python Weekly Brief Stop Wasting Hours Hunting for Python ResourcesEvery week, thousands of new Python libraries, AI frameworks, GitHub…
Why None Of These Needed An Excuse
Every single example above ran completely clean, on a plain machine, with nothing but pip install and your own data. No account to create, no key to request, no waiting on anyone's approval. That's genuinely rare for a list this useful, and it's exactly why these ten are worth actually keeping.
Take This With You
The Complete Python Guide (free, no signup wall) Every core concept, beginner through advanced, with real working code for each one. Read it free here
Once you're comfortable with the foundations, my full paid guide on Gumroad goes further, complete projects and production patterns you can build from directly.
Get the full guide: abdulahad28.gumroad.com
Subscribe to my Gumroad newsletter for a new breakdown like this one every week, free, straight to your inbox. Subscribe here: abdulahad28.gumroad.com