Welcome!
  • How to take this course
  • Python on Windows
  • Python on Mac
A Full Python Refresher
  • Introduction to this section
  • Access the code for this section here
  • Variables in Python
  • The Coding Exercises for This Section
  • Variables
  • Solution to coding exercise: Variables
  • String formatting in Python
  • Getting user input
  • Writing our first Python app
  • Lists, tuples, and sets
  • Advanced set operations
  • Lists, tuples, and sets
  • Solution to coding exercise: Lists, tuples, sets
  • Booleans in Python
  • If statements
  • The 'in' keyword in Python
  • If statements with the 'in' keyword
  • Loops in Python
  • Flow control—loops and ifs
  • Solution to coding exercise: Flow control
  • List comprehensions in Python
  • Dictionaries
  • Destructuring variables
  • Functions in Python
  • Function arguments and parameters
  • Default parameter values
  • Functions returning values
  • Functions
  • Solution to coding exercise: Functions
  • Lambda functions in Python
  • Dictionary comprehensions
  • Dictionaries and students
  • Solution to coding exercise: Dictionaries
  • Unpacking arguments
  • Unpacking keyword arguments
  • Object-Oriented Programming in Python
  • Magic methods: __str__ and __repr__
  • Classes and objects
  • Solution to coding exercise: Classes and objects
  • @classmethod and @staticmethod
  • @classmethod and @staticmethod
  • Solution to coding exercise: @classmethod and @staticmethod
  • Class inheritance
  • Class composition
  • Type hinting in Python 3.5+
  • Imports in Python
  • Relative imports in Python
  • Errors in Python
  • Custom error classes
  • First-class functions
  • Simple decorators in Python
  • The 'at' syntax for decorators
  • Decorating functions with parameters
  • Decorators with parameters
  • Mutability in Python
  • Mutable default parameters (and why they're a bad idea)
Your first REST API
  • What is an API?
  • Installing Flask
  • Access the code for this section here
  • Your first Flask application
  • HTTP Verbs
  • REST Principles
  • Creating our application endpoints
  • Returning a list of stores
  • Implementing other endpoints
  • Calling the API from JavaScript
  • Using Postman for API testing
Flask-RESTful for more efficient development
  • Virtualenvs and setting up Flask-RESTful
  • Access the code for this section here
  • Your first Flask-RESTful app
  • Test-first API design—what is that?
  • Creating our Item Resource
  • The ItemList and creating Items
  • Improving code and error control
  • Authentication and logging in—part 1
  • Authentication and logging in—part 2
  • DELETE to delete Items
  • PUT to create or update Items
  • Advanced request parsing with Flask-RESTful
  • Optimising our final code and request parsing
Storing resources in a SQL database
  • Setting up our project
  • Access the code for this section here
  • Running a SQLite database and interacting with it from Python
  • Logging in and retrieving Users from a database
  • Signing up and writing Users to a database
  • Preventing duplicate usernames when signing users up
  • Retrieving our Item resources from a database
  • Writing our Item resources to a database
  • Deleting our Item resources from the database
  • Refactoring insertion of items
  • The PUT method with database interaction
  • Retrieving many items from the database