匠人学院 JR Academy
  • Position

    Where am I now, and where should I go?

    How your job is changing, where your experience can take you and what you still need for a target role, worked out from what you have actually done. Free, and the full result needs no sign-up.

    Analyse my career and skills

    Look up a career

    Will AI replace my job?AI impact and transition paths for common careersNew jobs in the AI eraWhat they do, what they need, how to move in

    Focused tools

    AI Engineer interview readiness30 timed questions on what you still need before interviewsCareer personality testDirections that suit how you workReturning to China checkJob prospects in China by school, major and graduation date

    AI coach

    Talk to your AI coachStill unsure after your result? Talk through what is holding you back
  • Core courses

    AI Engineer BootcampEngineering bootcamp from LLM apps to agentsAI Engineer Full-Stack Project Class16 weeks · RAG and full-stack AI projectsVibe Coding Masterclass8 weeks · direct agents to build and ship a productAI Essentials10 hours · use AI for email, reports, data and copyAI Office Automation Course8 weeks · help a whole company adopt AIOne-Person Company (OPC) Bootcamp15 weeks in person · build a one-person company with AIAll courses →

    AI engineering

    Machine Learning & Data Engineering Full-Stack ClassAI Agent & MCP Project BootcampAI Engineer Core TechniquesAI Engineer FoundationsAI Engineer Advanced: RAG to Agents and TuningClaude Code TasterAll AI engineering courses →

    AI at work

    AI Coding for everyoneClaude Code One-Day Masterclass (Non-Technical)Enterprise AI Automation BootcampAI Marketing BootcampAI Risk, Governance and Audit CourseOpenClaw 4-Week Personal AI Assistant BootcampAll AI-at-work courses →

    Career development

    AI Product Manager (BA) Bootcamp + InternshipAustralia IT Interview BootcampAustralia IT Technical Interview BootcampAustralia IT Resume BootcampAustralia Big Tech Job Search BootcampAustralia IT Career Planning BootcampAll career courses →

    Learn free first

    Vibe CodingAI for office workPrompt MasterAI EngineerAI data analysisResource centerInstructorsAll learning paths →
  • Evidence

    What will convince an employer?

    Certifications, projects, team work and competition entries, collected into one portfolio.

    See the portfolio

    Certifications

    Cert Master · all certificationsPrep and mock exams for AWS, Azure, GCP, Claude and moreAWS CLF-C02Entry-level AWS cloud certificationAWS SAA-C03Entry certification for cloud architectsClaude certificationsAnthropic Claude certification seriesAll certifications →

    Projects and team work

    P3 team projectsBuild a project with real teammates in a simulated team workflowP3 project experienceThe parts of a P3 project that go on your resumeDemo DayProject showcaseP3 certificatesProof once a project is completeAll of P3 →

    Competitions and work

    HackathonsBuild something against the clockSubmit your workAdd your project to the showcaseCareerOS portfolioDo tasks in the desktop app; your results become portfolio pieces
    Cert MasterBrowser extension, app and mini programScreenshot a question for analysis and practise anywhereAbout Cert Master
  • Connect

    How do I get myself in front of employers?

    Resume, interviews, referrals and mentors. See how far you are from the target role first, then decide what to fix.

    Start with Jobpin

    Resume and openings

    Graduate careersGraduate preparation across Australia, China, Malaysia, Singapore, the US and UKJobpinAI job search workspace: resume, roles, applicationsAI resumeRewrite your resume against a job descriptionReferralsRoles shared by students and mentorsOpportunitiesInternships, projects and collaborationsOffer boardOffers students have received

    Interviews

    AI Engineer interview guideSeven areas, with worked examplesFDE interview guideFive rounds, from scoping to the customer roundAI mock interviewPractise by text or voice and see the gapsInterview storiesReal interview experiencesSystem Design handbookPrepare for system design interviewsAll interview prep →

    Mentors

    1:1 mentorsBook AI, career and technical mentors by the hourGroup tutoringShare a tutor with a few others and pay less eachCareer coachingResume, interview and direction packages
    Jobpin desktopOne workspace for the whole job searchOrganise real experience and refine resume versions for target roles on macOS or Windows.About Jobpin
BusinessMembershipDownload CareerOS
0
匠人学院 JR Academy

Follow Us

linkedinfacebooktwitterinstagramyoutube

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png
Airbotix · AI learning & creation for kids Another Life · AI story game
Products46

CareerOS and tools

  • CareerOS
  • Cert Master
  • Jobpin
  • Jobpin web
  • Jobpin report
  • Jobpin desktop download
  • My job search reports
  • Buy report credits
  • Jobpin billing
  • AI Toolbox
  • AI Skill Marketplace

Membership

  • Membership
  • AI membership

Courses

  • Bootcamps
  • Training Camp
  • Kanban learning
  • AI Builder course
  • MCP course
  • NotebookLM workshop
  • Business Analyst course
  • Web Full-Stack Bootcamp
  • DevOps Bootcamp
  • Data Engineering Bootcamp
  • Data Analysis Bootcamp
  • Coding for Beginners
  • Algorithm Bootcamp

Career services

  • Graduate careers
  • Graduate careers in Australia
  • Graduate careers in China
  • Graduate careers in Malaysia
  • Graduate careers in Singapore
  • Graduate careers in the US
  • Graduate careers in the UK
  • 1:1 coaching
  • Career coaching
  • AI Engineer VIP
  • BA & PM Internship
  • Data Science Internship
  • Data Analysis Internship
  • Marketing Internship
  • Resume Review
  • Interview Coaching
  • Job Application Service
  • Job Monitoring
  • LinkedIn Management
  • LinkedIn Networking
Library57

Learning paths

  • All Learning Paths
  • AI Engineer
  • Context Engineering
  • Vibe Coding
  • Prompt Master
  • AI Builder
  • AI Product Manager
  • Python Basics
  • AI Productivity
  • AI Data Analysis
  • AI Finance
  • AI Content Creation
  • AI Image Creation
  • Frontend Development
  • Hermes Agent
  • OpenClaw Local Agent

Interactive labs

  • Prompt Lab
  • Frontend Lab
  • JavaScript Lab
  • Python Lab
  • AWS Lab
  • Azure Lab
  • LLM Lab
  • Git Lab

Reference and guides

  • Resources
  • Wiki
  • Cheat sheets
  • Roadmaps
  • AI roadmaps
  • Videos
  • Ebooks
  • Blog
  • Interview handbook
  • Mock exams
  • Free resources

Cities

  • Sydney
  • Melbourne
  • Brisbane
  • Adelaide
  • Singapore
  • Kuala Lumpur
  • London
  • New York
  • San Francisco
  • Los Angeles
  • Seattle
  • Toronto
  • Vancouver

Immigration

  • Australia Immigration
  • Skilled Visa 189/190/491
  • Employer Sponsored 482/186/494
  • Business Visa 188/888
  • UK Immigration
  • US Immigration
  • Canada Immigration
  • Singapore immigration
  • Malaysia immigration
Business20

For business

  • AI for Business
  • Business portal sign-in
  • Corporate Training
  • Internship Partnership
  • Recruitment Partnership
  • Enterprise (EN)

Metatree AI Lab

  • Metatree AI Lab (Chinese)
  • AI solutions (Chinese)
  • Digital employees (Chinese)
  • Case studies (Chinese)
  • Metatree AI Lab
  • AI services
  • Digital employees
  • Case studies

AI education for kids

  • Airbotix — AI Learning & Creation for Kids
  • AU Family Resource Hub
  • NAPLAN Report Guide
  • My School Data Guide
  • Sydney Private School Fees 2026
  • Kids Coding Programs
About15

Company

  • About Us
  • Our Mentors
  • Become a Mentor
  • Metaverse Classroom
  • JR Careers
  • Another Life — AI Story Game
  • Contact Us

Help and policies

  • FAQs
  • Terms & Conditions
  • Privacy Policy
  • Cancellation & Refund Policy
  • Site map

Friend links

  • CS Browser

Contact

  • hello@jiangren.com.au
  • 0421-672-555

Offices

Level 10b, 144 Edward Street, Brisbane CBD (Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
45A13, Block B, Oriental Hope Tianxiang Plaza, 500 Tianfu Avenue Middle Section, Wuhou District, Chengdu, Sichuan, China
Business Hub, 155 Waymouth St, Adelaide SA 5000
Disclaimer
footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

All content on the JR Academy website, including course materials, logos, and information provided, is protected under Australian intellectual property laws. Unauthorized use, sale, distribution, reproduction, or modification is strictly prohibited. Violations may result in legal action. By accessing our website, you agree to respect our intellectual property. JR Academy Pty Ltd reserves all rights, including patents, trademarks, and copyrights. Any infringement will be subject to legal prosecution. View Terms of Service

© 2017-2026 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572

HomeLearnCoursesCerts
  1. Home
  2. Learn
  3. Blog
  4. Python 学到什么程度,可以开始做 AI 项目了
JR Academy · BlogCareer insights

Python 学到什么程度,可以开始做 AI 项目了

答案不是一份语法清单,是四个检查点:能读改别人的代码、能接住失败、环境依赖自己搞得定、会用类型表达约束。每个配一段可运行代码和一个当场能做的自测任务。

Published2026-07-28
Reading time1 min
Author

Contents

  • 检查点一:能读懂并修改别人的代码
  • 检查点二:能处理不确定的输入和失败
  • 检查点三:环境和依赖你自己搞得定
  • 检查点四:会用类型和数据结构表达约束
  • 不需要的部分(省下来的时间去学别的)
  • 最常见的两个误区
  • 过了四关之后,下一步学什么
  • 想系统学这部分内容?

匠人学院(JR Academy)AI Engineer Bootcamp 的入学前置要求写的是四样:Python、RESTful API 开发经验、云平台基础、Git。没有线性代数,也没有概率论。

于是最常被追问的一句就是:Python 到底要学到什么程度算够?

「够」不是一份语法清单。背完装饰器、生成器、元类,照样在第一个项目里卡死;反过来,只会函数、类、异常处理三样,但会读别人的代码、会处理超时,反而能直接上手。

下面是四个检查点,每个都配一个能当场做的自测任务。四个都做得出来,你就可以停止学 Python,去学别的了。


检查点一:能读懂并修改别人的代码

这是最被低估的一条。

做 AI 项目的真实时间分配里,从零写新代码大概只占两成。剩下八成是:看懂一个开源库的示例、改成自己的场景、它报错了、去读库的源码、发现是版本行为变了。

「会写」和「会读」是两种能力。教程训练的是前者,项目需要的是后者。

自测任务 T1:随便挑一个你没用过的开源库,打开它 examples 目录里最短的那个文件,不看文档,说出三件事——输入是什么、输出是什么、什么情况下它会失败。说不出来就继续练读代码,别急着往下走。

检查点二:能处理不确定的输入和失败

这是 AI 项目和教学项目最大的差别。

调用大模型 API 这件事,失败是常态不是异常:超时、限流、返回的 JSON 少一个括号、内容被截断。教程里的示例代码从来不处理这些,因为处理了就不像教程了。

最小可用的写法长这样:

import time

import requests


def call_with_retry(url, payload, retries=3, timeout=30):
    """失败是常态:超时、限流、返回不是合法 JSON,三种都要接住。"""
    for attempt in range(retries):
        try:
            resp = requests.post(url, json=payload, timeout=timeout)
            resp.raise_for_status()
            return resp.json()
        except requests.Timeout:
            time.sleep(2 ** attempt)     # 指数退避,别用固定 sleep
        except ValueError:
            # resp.json() 解析失败抛的是 ValueError 的子类
            # (模型返回被截断时会走到这里),重试一次通常就好
            time.sleep(1)
    raise RuntimeError(f"{retries} 次都失败了: {url}")

这段代码里没有任何 AI 的东西,全是普通 Python。但它决定了你的项目是能跑一次的 demo,还是能连续跑一周的服务。

自测任务 T2:给任意一个公开 API 写一个客户端,要求同时处理超时、重试、以及"返回的不是合法 JSON"三种情况。写完把网线拔了跑一次,看它是干净地报错还是整个崩掉。

检查点三:环境和依赖你自己搞得定

「我本地能跑,服务器上不行」这句话,是新手项目死亡率最高的地方。

需要会的就三件事:

  • 建虚拟环境,知道为什么要建(不同项目的依赖版本会打架)
  • 把依赖版本锁死,而不是 pip install 完就完事
  • 出问题时能判断这是代码问题、依赖版本问题,还是环境变量没设

这一段没有捷径也没有理论,就是踩几次。但它必须在进项目之前踩完,否则项目的第一周会全部消耗在这里,然后你会误以为是自己不适合做这个。

自测任务 T3:把你的项目在一台干净的机器(或者一个新建的容器)上从零装起来跑通,全程只能照着你自己写的 README。README 有一步说不清楚,就是这一关没过。

检查点四:会用类型和数据结构表达约束

大模型的输出是不确定的文本。要把它接进程序,就得有一道"这个输出符不符合我要的形状"的关卡。

Python 这边最常见的做法是用数据模型描述期望结构,然后让它去校验:

from pydantic import BaseModel, ValidationError


class JobMatch(BaseModel):
    title: str
    company: str
    match_score: float          # 模型爱返回 "0.85" 字符串,这里会自动转成 float
    reasons: list[str]


def parse_model_output(raw: dict) -> JobMatch | None:
    try:
        return JobMatch(**raw)
    except ValidationError as e:
        # 校验失败不是 bug,是必然会发生的事:记下来,让上层决定重试还是降级
        print("模型输出不符合结构:", e.errors())
        return None

会写这样一个类,比会背十个语法糖有用得多。因为它对应的是 AI 工程里一个真实的关卡:不确定的输出 → 确定的结构。

自测任务 T4:定义一个有嵌套结构的数据模型(比如一个订单包含多个条目),然后故意喂三种坏数据进去——少字段、类型对不上、多了不认识的字段。前两种会报错;第三种默认是被静默忽略的,想让它也报错要显式配 extra="forbid"。这个差别值得你亲手撞一次,因为"字段被悄悄丢掉"是接大模型输出时最难查的一类问题。


不需要的部分(省下来的时间去学别的)

这些经常出现在"Python 进阶"清单里,但对开始做 AI 项目没有帮助:

  • 元编程 / 元类 / 描述符 —— 写框架的人需要,用框架的人不需要
  • 多线程和 GIL 的细节 —— 你的瓶颈几乎总是等 API 返回,先学 async 的用法就够,原理以后再补
  • 算法竞赛题 —— 面试可能考,做项目基本用不上
  • 深度学习的数学推导 —— 那是研究方向的地基,不是应用工程的

我不是说这些没价值。我是说,在"能不能开始做项目"这个问题上,它们的优先级排在四个检查点后面。

最常见的两个误区

误区一:想先把一本书读完再开始。 这条路的问题在于,书的后三分之一你根本用不上,而你读到那里的时候前三分之一已经忘了。正确的顺序是四个检查点过掉就开始,缺的东西在项目里现补——那时候你补得进去,因为有具体问题挂着。

误区二:追求"精通"。 Python 没有精通这个终点。判断标准应该换成"够不够我做下一件事"。四个自测任务能做出来,就够开始 AI Engineer 方向的第一段了。

我自己带人的时候见过最可惜的情况,是有人在语法上反复打磨了几个月,最后进项目时发现真正卡住他的是第三条——环境和依赖,而那一条从来不在任何一本 Python 书的重点章节里。


过了四关之后,下一步学什么

按 AI Engineer Bootcamp 大纲的顺序,Python 地基之后紧接着的是 Foundation → Context Engineering → RAG,然后才是 Agent、Multi-Agent、Memory、Harness Engineering、Model Layer,最后是 Observability & Evals。整个大纲 10 个 phase、290 节课、68 个交互式 Lab、59 场直播,公开可查。

顺序值得留意:Context Engineering 排在 RAG 前面,因为不会组织上下文的人做 RAG,做出来的是一个"能检索但答不准"的东西。

匠人学院是项目制 AI 工程实战平台(澳洲),采用 P3 模式(Project + Production + Placement)。

四个自测任务,今天就能做。做完你会发现,"Python 学到什么程度"这个问题问错了——真正该问的是"我还差哪一关"。


想系统学这部分内容?

  • 🐍 补地基:Python 学习方向 —— 四个检查点对应的基础能力
  • 📘 下一段:匠人学院 AI Engineer Bootcamp —— 12 周技术课程 + 12 周 P3 职业孵化
  • 💬 不确定自己该从哪一关开始:Bootcamp 报名与咨询
  • 📖 同主题延伸:前端、后端、全栈转 AI Engineer:三条不一样的捷径
Author
Share or copy the link

Related learning resources

  • AI learning hub
  • Prompt engineering
  • Interactive Python course
← Previous articleAZ-204 四天后退役 AI-200 接班 · 免费 DP-600 考券截止 8/10 · Anthropic 认证上线 Pearson VUENext article →悉尼留子们!这周五有场🆓AI Career Meetup

Related articles

🇦🇺测一下:袋鼠国码农能当FDE吗?

2026-12-01

Monash 研究:肠道酸度是膳食纤维降血压的关键;AI 搬运新闻冲击维州选举信息;MPAC 公布 2027 演出季

2026-12-01

Adelaide 物理学家获 $250,000 总理科学奖;全球葡萄酒消费六十年降四分之一;残障师范生实习障碍研究

2026-12-01

DVA-C03今日上线首发 · Google Cloud AI Agent认证完整解析 · AZ-401本月GA替代AZ-400

2026-12-01

Anthropic推迟下一代模型并调百人做安全,AWS推出AI办公三件套,Google让用户单独关掉AI训练

2026-12-01

GitHub Copilot 实战指南 — Copilot AI Code Review:30 秒让 AI 帮你审 PR,三档深度随需切换

2026-11-30
View all articles →

Done reading? Next steps

Not sure what to learn next? Tell us where you are

Tell us what you do now and where you want to go. See your gaps in skills, evidence, experience, expression and positioning, and what to work on first. No sign-in needed.

Compare with my situation
  • SkillAI Engineer Bootcamp13 weeks, 12 Theory + 13 Practice live classes. You build one Agent system across Context, RAG, Tools, Memory and production Evals. Built for Applied AI and Agent Engineer roles.See the program →
  • PositioningLearning roadmaps by roleFrontend, backend, data, AI and more, laid out stage by stage in the order to learn them.All roadmaps →
  • ExpressionTry an AI mock interviewPick a role and run a mock interview to practise explaining your experience and projects.Practise now →

Not sure what to do next?

Take this page's topic with you and see where your gaps are.

Compare with my situation
JR Academy
AI learning for the global Chinese community
BootcampsFree resourcesLearn AICareer coaching
精选推荐
AI Career Impact Map
Assess career exposure and explore transition paths and learning options
Popular tool
AI & Data Bootcamps
Build your skills through structured courses and hands-on projects
Popular courses
1:1 Career Coaching
Work with an experienced mentor on your resume and interview preparation
Career coaching
Custom Corporate Training
AI training tailored to your team
Business services
Popular tags
Vibe CodingAI codingCursorClaudeJob searchPromptFrontend developmentBackend development
Subscribe to updates

Receive AI learning resources, technical tutorials and career advice by email.

We respect your privacy and do not send spam.