Auto-Generate Weekly Status Reports with Claude API: Drop in Some Keywords, Get a Full Report in 10 Seconds (2026)

It’s Friday afternoon. You’re staring at a blank document, trying to remember what you actually did this week.
Sound familiar?
This tutorial walks you through building a weekly report generator in Python using the Claude API. Dump in a few keywords from your week — Claude handles the rest. You get a properly formatted, professionally written status report in about 10 seconds. No VPN needed, works straight out of the box.
📌 All code in this post has been tested locally and is ready to copy-paste.
What the Output Looks Like
Input — a handful of keywords: requirements review, API integration, fixed login bug, code review, team meeting
Output — 10 seconds later:
【Weekly Work Summary】
I. Requirements & Planning
II. Development & Implementation
III. Collaboration & Support
【Next Week’s Plan】
Prerequisites
pip install anthropic
You’ll also need a Claude API key. ClaudeAPI.com is a straightforward option — direct access from anywhere, no VPN required, top up via card or PayPal, and you get free trial credits on sign-up. Most developers are up and running within 5 minutes.
Step 1: Minimal Report Generator
Create a file called weekly_report.py and paste in the following:
import os
import anthropic
os.environ[“HTTP_PROXY”] = “”
os.environ[“HTTPS_PROXY”] = “”
os.environ[“http_proxy”] = “”
os.environ[“https_proxy”] = “”
client = anthropic.Anthropic(
api\_key="your\-api\-key\-here", \# Replace with your Key
base\_url="https://api\.claudeapi\.com", \# Direct endpoint, no VPN needed
timeout=60\.0,
)
keywords = “requirements review, API integration, fixed login bug, code review, team meeting”
response = client.messages.create(
model="claude\-haiku\-4\-5\-20251001",
max\_tokens=1024,
system="""You are a professional workplace writing assistant. Based on the work keywords provided by the user,
generate a well-formatted weekly status report. Requirements:
-
Organize work items into numbered sections (I, II, III, etc.)
-
Keep the tone concise and professional
-
Expand each keyword into a complete, descriptive sentence
-
Append a “Next Week’s Plan” section at the end, inferred from this week’s work
-
Do not add any extra commentary or explanation"“”,
messages=[{“role”: “user”, “content”: f"This week’s work keywords:{keywords}"}],
)
print(response.content[0].text)
Run it:
Step 2: Switch Between Three Output Styles
Every team has different reporting conventions. Add a style parameter to toggle between three formats instantly:
STYLE_PROMPTS = {
"standard": "Generate a formal, structured weekly report organized into numbered sections (I, II, III). Use professional language, expand each item into a full sentence, and append a next-week plan at the end.",
"bullet": "Generate a concise bullet-point weekly report. Each item should start with '·' and be summarized in one clear sentence. End with 3 bullet points for next week's plan.",
"kpi": "Generate a KPI-driven weekly report in this format: 【Task】Completion Status | Data | Business Value.",
def generate_report(keywords: str, style:
str = "standard") -> str:
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=1024,
system=f"You are a professional workplace writing assistant. {STYLE_PROMPTS.get(style, STYLE_PROMPTS['standard'])} Do not add any extra commentary.",
messages=[{"role": "user", "content": f"This week's work keywords: {keywords}"}],
)
return response.content[0].text
str = "standard") -> str:
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=1024,
system=f"You are a professional workplace writing assistant. {STYLE_PROMPTS.get(style, STYLE_PROMPTS['standard'])} Do not add any extra commentary.",
messages=[{"role": "user", "content": f"This week's work keywords: {keywords}"}],
)
return response.content[0].text
Comparing the Three Styles
| Style | Best For | Output Characteristics |
|---|---|---|
| standard | Traditional enterprises, formal organizations | Clearly structured, formal tone, hierarchical layout |
| bullet | Tech companies, startups | One item per line, fast to scan |
| kpi | Sales, operations, results-driven roles | Quantified metrics, value-focused |
Bullet Style — Sample Output
- Completed requirements review and confirmed feature scope · Finished front-end and back-end API integration
- Fixed login bug — verified and deployed to production
- Completed code review and submitted 2 improvement suggestions · Attended team meeting and synced on project progress
Next week’s plan:
- Push forward feature development · Monitor API stability · Kick off scheduling for new feature release
KPI Style — Sample Output
-
【Requirements Review】Completed | Covered 5 core feature points | Clarified development priorities, reducing future rework
-
【API Integration】Completed | Integrated 12 endpoints | Ensured data consistency between frontend and backend
-
【Bug Fix】Completed | Resolved 1 login error | Improved user login success rate
Step 3: Interactive CLI Tool
Editing the script every time is tedious. Turn it into an interactive tool — run it once, then pick your style and enter keywords on the fly:
def generate_report(keywords: str, style: str = "standard") -> str:
print("=" * 50)
print(" AI Weekly Report Generator · Powered by Claude API")
print("=" * 50)
print("\nSelect report style:")
print(" 1. Standard Professional (default)")
print(" 2. Concise Bullet Points")
print(" 3. KPI Data-Driven")
choice = input("\nEnter a number (press Enter for default 1): ").strip() or "1"
style = {"1": "standard", "2": "bullet", "3": "kpi"}.get(choice, "standard")
print("\nEnter this week's work keywords (space or comma-separated):")
print('Example: requirements review, API integration, fix login bug, code review, team meeting')
keywords = input("> ").strip()
if not keywords:
print("Keywords cannot be empty."); return
print("\n⏳ Generating your report...\n")
result = generate_report(keywords, style)
print("=" * 50)
print(result)
print("=" * 50)
return result
Step 4: Auto-Save to Desktop
Once generated, automatically save the report as a .txt file with a date-stamped filename — ready to copy-paste into Slack, email, or any team tool:
import datetime
def save_report(content: str) -> str:
today = datetime.date.today()
monday = today - datetime.timedelta(days=today.weekday())
friday = monday + datetime.timedelta(days=4)
filename = f"weekly_report_{monday.strftime('%m%d')}-{friday.strftime('%m%d')}.txt"
filepath = os.path.join(os.path.expanduser("~"), "Desktop", filename)
with open(filepath, "w", encoding="utf-8") as f:
f.write(f"Weekly Report ({monday} to {friday})\n{'=' * 40}\n\n{content}")
return filepath
import datetime
def save_report(content: str) -> str:
today = datetime.date.today()
monday = today - datetime.timedelta(days=today.weekday())
friday = monday + datetime.timedelta(days=4)
filename = f"weekly_report_{monday.strftime('%m%d')}-{friday.strftime('%m%d')}.txt"
filepath = os.path.join(os.path.expanduser("~"), "Desktop", filename)
with open(filepath, "w", encoding="utf-8") as f:
f.write(f"Weekly Report ({monday} to {friday})\n{'=' * 40}\n\n{content}")
return filepath
After running, you’ll find weekly_report_0401-0405.txt sitting on your Desktop — open and send.
Step 5: Batch Generation for the Whole Team
Perfect for team leads — generate report drafts for every team member in one shot:
team\_keywords = \{
"Alex (Frontend)": "login page redesign, mobile responsiveness, performance optimization, code review",
"Bob (Backend)": "user API development, database optimization, API docs update, bug fixes",
"Carol (QA)": "functional testing, regression testing, test report, bug tracking",
}
for name, keywords in team_keywords.items():
print(f"\n{'=' * 40}")
print(f"【{name}】")
print(generate_report(keywords, style="bullet"))
team\_keywords = \{
"Alex (Frontend)": "login page redesign, mobile responsiveness, performance optimization, code review",
"Bob (Backend)": "user API development, database optimization, API docs update, bug fixes",
"Carol (QA)": "functional testing, regression testing, test report, bug tracking",
}
for name, keywords in team_keywords.items():
print(f"\n{'=' * 40}")
print(f"【{name}】")
print(generate_report(keywords, style="bullet"))
for name, keywords in team_keywords.items():
print\(f"\\n\{'=' \* 40\}"\)
print\(f"【\{name\}】"\)
print\(generate\_report\(keywords, style="bullet"\)\)
Sample Output (excerpt)
【Alex (Frontend)】
-
Redesigned the login page UI, improving overall interaction flow
-
Completed mobile responsiveness — now compatible with all major device sizes
-
Implemented performance optimizations — page load time reduced by 30%
-
Participated in code review and submitted 2 actionable improvement suggestions
Next week’s plan:
- Kick off next-phase page development
-Track and monitor performance metrics
-Continue contributing to team code reviews
Full Code (Copy & Run)
Paste everything into weekly_report.py and run it directly:
import os
import datetime
import anthropic
os.environ["HTTP_PROXY"] = ""
os.environ["HTTPS_PROXY"] = ""
os.environ["ALL_PROXY"] = ""
os.environ["http_proxy"] = ""
os.environ["https_proxy"] = ""
os.environ["all_proxy"] = ""
client = anthropic.Anthropic(
api_key="your-api-key-here",
base_url="https://api.claudeapi.com",
timeout=60.0,
)
STYLE_PROMPTS = {
"standard": "Generate a formal, structured weekly report organized into numbered sections (I, II, III). Use professional language, expand each item into a full sentence, and append a next-week plan at the end.",
"bullet": "Generate a concise bullet-point weekly report. Each item starts with '·' and is summarized in one clear sentence. End with 3 bullet points for next week's plan.",
"kpi": "Generate a KPI-driven weekly report in this format: 【Task】Completion Status | Data | Business Value.",
}
def generate_report(keywords: str, style: str = "standard") -> str:
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=1024,
system=f"You are a professional workplace writing assistant. {STYLE_PROMPTS.get(style, STYLE_PROMPTS['standard'])} Do not add any extra commentary.",
messages=[{"role": "user", "content": f"This week's work keywords: {keywords}"}],
)
return response.content[0].text
def save_report(content: str) -> str:
today = datetime.date.today()
monday = today - datetime.timedelta(days=today.weekday())
friday = monday + datetime.timedelta(days=4)
filename = f"weekly_report_{monday.strftime('%m%d')}-{friday.strftime('%m%d')}.txt"
filepath = os.path.join(os.path.expanduser("~"), "Desktop", filename)
with open(filepath, "w", encoding="utf-8") as f:
f.write(f"Weekly Report ({monday} to {friday})\n{'=' * 40}\n\n{content}")
return filepath
def interactive_report():
print("=" * 50)
print(" AI Weekly Report Generator · Powered by Claude API")
print("=" * 50)
print("\nSelect report style:")
print(" 1. Standard Professional (default)")
print(" 2. Concise Bullet Points")
print(" 3. KPI Data-Driven")
choice = input("\nEnter a number (press Enter for default 1): ").strip() or "1"
style = {"1": "standard", "2": "bullet", "3": "kpi"}.get(choice, "standard")
print("\nEnter this week's work keywords (space or comma-separated):")
keywords = input("> ").strip()
if not keywords:
print("Keywords cannot be empty."); return
print("\n⏳ Generating your report...\n")
result = generate_report(keywords, style)
print("=" * 50)
print(result)
print("=" * 50)
save = input("\nSave to Desktop? (y/n): ").strip().lower()
if save == "y":
path = save_report(result)
print(f"✅ Saved to: {path}")
if __name__ == "__main__":
interactive_report()
import os
import datetime
import anthropic
os.environ["HTTP_PROXY"] = ""
os.environ["HTTPS_PROXY"] = ""
os.environ["ALL_PROXY"] = ""
os.environ["http_proxy"] = ""
os.environ["https_proxy"] = ""
os.environ["all_proxy"] = ""
client = anthropic.Anthropic(
api_key="your-api-key-here",
base_url="https://api.claudeapi.com",
timeout=60.0,
)
STYLE_PROMPTS = {
"standard": "Generate a formal, structured weekly report organized into numbered sections (I, II, III). Use professional language, expand each item into a full sentence, and append a next-week plan at the end.",
"bullet": "Generate a concise bullet-point weekly report. Each item starts with '·' and is summarized in one clear sentence. End with 3 bullet points for next week's plan.",
"kpi": "Generate a KPI-driven weekly report in this format: 【Task】Completion Status | Data | Business Value.",
}
def generate_report(keywords: str, style: str = "standard") -> str:
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=1024,
system=f"You are a professional workplace writing assistant. {STYLE_PROMPTS.get(style, STYLE_PROMPTS['standard'])} Do not add any extra commentary.",
messages=[{"role": "user", "content": f"This week's work keywords: {keywords}"}],
)
return response.content[0].text
def save_report(content: str) -> str:
today = datetime.date.today()
monday = today - datetime.timedelta(days=today.weekday())
friday = monday + datetime.timedelta(days=4)
filename = f"weekly_report_{monday.strftime('%m%d')}-{friday.strftime('%m%d')}.txt"
filepath = os.path.join(os.path.expanduser("~"), "Desktop", filename)
with open(filepath, "w", encoding="utf-8") as f:
f.write(f"Weekly Report ({monday} to {friday})\n{'=' * 40}\n\n{content}")
return filepath
def interactive_report():
print("=" * 50)
print(" AI Weekly Report Generator · Powered by Claude API")
print("=" * 50)
print("\nSelect report style:")
print(" 1. Standard Professional (default)")
print(" 2. Concise Bullet Points")
print(" 3. KPI Data-Driven")
choice = input("\nEnter a number (press Enter for default 1): ").strip() or "1"
style = {"1": "standard", "2": "bullet", "3": "kpi"}.get(choice, "standard")
print("\nEnter this week's work keywords (space or comma-separated):")
keywords = input("> ").strip()
if not keywords:
print("Keywords cannot be empty."); return
print("\n⏳ Generating your report...\n")
result = generate_report(keywords, style)
print("=" * 50)
print(result)
print("=" * 50)
save = input("\nSave to Desktop? (y/n): ").strip().lower()
if save == "y":
path = save_report(result)
print(f"✅ Saved to: {path}")
if __name__ == "__main__":
interactive_report()
FAQ
Q: How detailed should my keywords be? The more specific, the better. “fixed login page redirect bug” produces far better output than just “fixed bug”. Include feature names, module names, and action verbs for the most accurate results.
Q: Can I send the generated report directly without editing? We recommend a quick review first. AI doesn’t have access to your actual numbers — things like “completed X tickets” or “improved performance by Y%” will need to be filled in manually.
Q: Can it generate daily or monthly reports? Yes. Just change “weekly report” in the system prompt to “daily report” or “monthly report” — everything else stays the same.
Q: Can it output reports in English? Append “Respond entirely in English.” to the end of the system prompt. No other changes needed.
Closing Thoughts A fully automated report generator in under 30 lines of core logic — saving you at least half an hour every Friday.
The only real hurdle for developers outside China is API connectivity. The official api.anthropic.com endpoint can be unreliable in certain regions, and dropped connections are frustrating no matter how clean your code is.
Why ClaudeAPI.com? ClaudeAPI.com is a Claude API relay platform built for developers who need reliable, low-latency access from anywhere:
-
🌐 Direct access, no VPN required — Multi-node routing, avg. latency under 200ms, accessible globally
-
🔌 Dual-format compatibility — Supports both native Anthropic SDK and OpenAI-compatible format; zero migration cost
-
🤖 Full model lineup — Haiku / Sonnet / Opus all supported, switch anytime
-
💳 Flexible billing — Pay via credit card, PayPal, or crypto; no region restrictions
-
✅ Production-grade reliability — 99.8% uptime, trusted by 10,000+ developers
-
🔒 Data privacy first — No data stored on disk, isolated API keys, TLS encryption end-to-end
Switching over takes exactly one line of code::
client = anthropic.Anthropic(
api\_key="your\-claudeapi\-key",
base\_url="https://api\.claudeapi\.com", \# ← change this only, everything else stays the same
👉 Sign up at claudeapi.com — fire your first API request within 3 minutes.
Published April 2026 · 8 min read · Claude API Tutorial



