Open a chapter to see its sections. Each chapter ends with a QR code for its free assessment.
1Prompt Engineering and AI Assistants
- 1.1 Why prompt engineering comes first
- 1.2 How AI assistants produce answers
- 1.3 The major assistants
- 1.4 The anatomy of a prompt
- 1.5 Prompting techniques
- 1.6 AI in your coding environment
- 1.7 Calling models from your own code
- 1.8 Using AI responsibly
Take the Chapter 1 assessment
2Computers, Programs and the Python Toolchain
- 2.1 What a computer does
- 2.2 Source code, compilers and interpreters
- 2.3 Installing your tools
- 2.4 The terminal
- 2.5 Reading documentation
- 2.6 Using AI coding assistants responsibly
Take the Chapter 2 assessment
3Values, Types and Expressions
- 3.1 Literals, variables and names
- 3.2 Numbers
- 3.3 Strings
- 3.4 Booleans and logic
- 3.5 Operator precedence and evaluation
- 3.6 Type conversion, input and output
Take the Chapter 3 assessment
4Control Flow and Algorithmic Thinking
- 4.1 Sequence, selection and repetition
- 4.2 Selection with if, elif and else
- 4.3 Repetition with while and for
- 4.4 Pseudocode and flowcharts
- 4.5 Proving that loops are correct
- 4.6 Tracing and off-by-one errors
- 4.7 Counting steps: an introduction to complexity
- 4.8 Case study: a fee instalment schedule
Take the Chapter 4 assessment
5Data Structures in Python
- 5.1 Lists and tuples
- 5.2 Dictionaries and sets
- 5.3 Nested structures and JSON
- 5.4 Comprehensions and generator expressions
- 5.5 Choosing a structure
Take the Chapter 5 assessment
6Functions, Modules and Errors
- 6.1 Defining functions
- 6.2 Parameters in depth
- 6.3 Scope
- 6.4 Recursion
- 6.5 Modules and packages
- 6.6 Exceptions
- 6.7 Testing
Take the Chapter 6 assessment
7Objects and Classes
- 7.1 Classes and instances
- 7.2 Encapsulation and invariants
- 7.3 Inheritance, polymorphism and composition
- 7.4 Special methods and the data model
- 7.5 Dataclasses
- 7.6 UML class diagrams
Take the Chapter 7 assessment
8Files, Data Formats and the Operating System
- 8.1 Text and binary files
- 8.2 Structured text formats
- 8.3 Working with the file system
- 8.4 Logging
Take the Chapter 8 assessment
9Networks, IP Addresses and Ports
- 9.1 Layered models
- 9.2 IP addresses
- 9.3 Ports and sockets
- 9.4 The Domain Name System
- 9.5 TCP and UDP
Take the Chapter 9 assessment
10HTTP from First Principles
- 10.1 Requests and responses
- 10.2 URLs
- 10.3 Statelessness, cookies and sessions
- 10.4 HTTPS and TLS
- 10.5 A web server from raw sockets
- 10.6 Python's http.server
- 10.7 Inspecting traffic
Take the Chapter 10 assessment
11The Front End: HTML, CSS and JavaScript
- 11.1 HTML: structure and meaning
- 11.2 CSS: presentation
- 11.3 JavaScript: behaviour
- 11.4 The DOM and fetch
- 11.5 Accessibility
Take the Chapter 11 assessment
12Flask Fundamentals
- 12.1 The WSGI model
- 12.2 A first Flask application
- 12.3 Routing
- 12.4 The request and response
- 12.5 Templates with Jinja2
- 12.6 Static files and project layout
- 12.7 Blueprints and the application factory
Take the Chapter 12 assessment
13Forms, Cookies, Sessions and Authentication
- 13.1 Handling forms
- 13.2 Cookies
- 13.3 Sessions
- 13.4 Passwords
- 13.5 Logging in and staying logged in
- 13.6 Post/Redirect/Get
- 13.7 Cross-site request forgery
Take the Chapter 13 assessment
14Databases: SQL, PostgreSQL and SQLAlchemy
- 14.1 The relational model
- 14.2 SQL
- 14.3 Designing a schema: normalisation
- 14.4 Indexes and query cost
- 14.5 Transactions
- 14.6 SQLite in development, PostgreSQL in production
- 14.7 SQLAlchemy and Flask-SQLAlchemy
Take the Chapter 14 assessment
15REST APIs and FastAPI
- 15.1 REST principles
- 15.2 Designing JSON APIs
- 15.3 FastAPI
- 15.4 Automatic documentation
- 15.5 Asynchronous programming
- 15.6 Authentication with tokens
- 15.7 Testing APIs
Take the Chapter 15 assessment
16Serving Machine-Learning Models
- 16.1 The life of a deployed model
- 16.2 Training and saving a model
- 16.3 Prediction endpoints
- 16.4 Validation and versioning
- 16.5 Latency, throughput and batching
- 16.6 Case study: a crop-disease classifier behind an API
Take the Chapter 16 assessment
17Desktop GUIs with PyQt5
- 17.1 Why build a desktop GUI
- 17.2 Event-driven programming
- 17.3 Widgets
- 17.4 Layouts
- 17.5 Signals and slots
- 17.6 Qt Designer and .ui files
- 17.7 Threads in a GUI
- 17.8 Packaging with PyInstaller
- 17.9 Case study: a desktop client for the prediction API
Take the Chapter 17 assessment
18Version Control with Git and GitHub
- 18.1 Why version control
- 18.2 How Git stores history
- 18.3 Recording changes
- 18.4 Branching and merging
- 18.5 Remotes and GitHub
- 18.6 What belongs in a repository
- 18.7 Team workflows
Take the Chapter 18 assessment
19Hosting and Cloud Deployment
- 19.1 From laptop to server
- 19.2 Deploying to Render
- 19.3 AWS essentials
- 19.4 Application servers and reverse proxies
- 19.5 Domains, DNS and HTTPS
- 19.6 Containers with Docker
- 19.7 Monitoring, logs and costs
Take the Chapter 19 assessment
20Security Essentials for Developers
- 20.1 Goals and risk
- 20.2 The OWASP Top 10
- 20.3 Injection
- 20.4 Cross-site scripting
- 20.5 Secrets, passwords and least privilege
- 20.6 Backups and incident response
Take the Chapter 20 assessment
21Introduction to AI and No-Code AI Tools
- 21.1 What AI, machine learning and robotics are
- 21.2 A map of AI tools
- 21.3 No-code AI workflows
- 21.4 Evaluating AI outputs
- 21.5 Ethics, privacy and data protection
Take the Chapter 21 assessment
22Building Applications with Large Language Models
- 22.1 Inside a language model
- 22.2 Structured outputs and templates
- 22.3 Iterating and testing prompts
- 22.4 Calling an LLM API from Python
- 22.5 Prompt injection and safe use
Take the Chapter 22 assessment