TaskLibraryInstallationFile systempathlib, shutil, osstdlibCSVcsvstdlibExcelopenpyxl``pip install openpyxlExcel (old)xlrd / xlwt``pip install xlrd xlwtPDF textPyMuPDF (fitz)pip install PyMuPDFPDF tablescamelot-py / tabula-py``pip install camelot-pyWeb scrapingrequests + BeautifulSoup4``pip install requests beautifulsoup4Browser automationplaywright or selenium``pip install playwrightCLIargparse (stdlib) or clickstdlib / pip install clickRich terminalrich``pip install richFile watchingwatchdog``pip install watchdogSchedulingschedule or cronpip install schedule
python
from pathlib import Path
for f in Path(".").glob("**/*.txt"):
content = f.read_text()
# transform content
f.write_text(content)
python
import csv
with open("input.csv", newline="") as f:
reader = csv.DictReader(f)
for row in reader:
print(row["column_name"])
with open("output.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerow(["col1", "col2"])
writer.writerow(["val1", "val2"])
python
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws["A1"] = "Hello"
ws["B1"] = 42
wb.save("output.xlsx")
python
import requests
from bs4 import BeautifulSoup
resp = requests.get("https://example.com", timeout=10)
soup = BeautifulSoup(resp.text, "html.parser")
for link in soup.select("a[href]"):
print(link["href"], link.text.strip())
See scripts/ for ready-to-use automation scripts:
rename_batch.py — Batch rename files with pattern matchingcsv_to_excel.py — Convert CSV files to Excel workbooks