Learn your way! Get started

Python 3, Part 6 of 6: Modules, JSON, and Algorithms

with expert Jordan Hudgens


Watch trailer


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 12/22/2014
Level Intermediate
Runtime 2h 25m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs N/A
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

In this course, we will cover how you can leverage popular libraries and modules into your applications. This is a vital tool for any Python developer, as modules can save you a significant amount of time by providing powerful functionality that isn’t natively built into Python 3. We will also cover how you can integrate with third-party APIs to connect with other software in your own applications. Next, we will introduce and discuss the topic of metaprogramming in Python. Metaprogramming is an extremely powerful technique that can provide the developer with the ability to modify a program’s structure at runtime. Then we will discuss how Python interacts with XML and JSON objects. These are common constructs when dealing with any types of data in Python, and we will approach this topic with a three-headed approach: An initial look at the structure of XML and JSON, how to generate XML and JSON objects, and also how to parse XML and JSON feeds. To close this course, we will take a broader look at the implementation of complex algorithms.

Prerequisites

This course is for anyone with the basic understanding of programming using Python 3. You should have the basic understanding of Python 3 to get the full use of this course. If you don’t have a basic understanding of Python 3 please view the Python 3: Fundamentals series starting with ‘Python 3: Getting Started’, ‘Python 3: Statements’, ‘Python 3: Data’, and ‘Python 3: Functions and Classes.’

Learning Paths

This course is part of the following LearnNowOnline SuccessPaths™:
Python Development

Meet the expert

Jordan Hudgens has certifications for Ruby on Rails, Thinkful; Ruby on Rails, Bloc.io; Front End Development, Thinkful; and AngularJS, Thinkful. He is currently vice president of engineering for TRACKR in Midland, Texas and is working on his PhD in Computer Science from Texas Tech. In addition to Ruby, Jordan works with PHP, JavaScript, MySQL, Postgres, CSS3, C, C++, C#, Objective-C, and Python. He also works with the frameworks Rails (Ruby), Zend (PHP), and Django (Python), plus the libraries AngularJS, jQuery, and Backbone.js.

Course outline



Modules and Packages

Modules and Packages (25:14)
  • Introduction (00:22)
  • Configuring Packages (00:22)
  • Demo: Get Package (04:47)
  • Demo: NumPy (05:12)
  • Using Packages (01:09)
  • Demo: Beautiful Soup 4 (01:13)
  • Demo: Integrate Packages (02:02)
  • Demo: Beautiful Soup (04:57)
  • Demo: Requests (04:53)
  • Summary (00:14)
Working with APIs (14:38)
  • Introduction (00:25)
  • API Integration (03:19)
  • Demo: Twilio Setup (03:53)
  • Demo: Message (04:59)
  • Demo: Run Twilio (01:44)
  • Summary (00:15)

Metaprogramming and JSON

Metaprogramming Primer (19:01)
  • Introduction (00:19)
  • Implicit Properties & Attrs (04:06)
  • Demo: Metaclass (04:00)
  • Demo: ExampleClass (03:06)
  • Global vs Local (02:07)
  • Demo: Global Variables (05:04)
  • Summary (00:16)
Decorators and Monkey Patching (21:19)
  • Introduction (00:23)
  • Decorators for Metaprogramming (04:31)
  • Demo: Decorators (05:27)
  • Monkey Patching (02:47)
  • Demo: Monkey Patching (03:41)
  • Demo: Monkey Patching (Cont) (04:13)
  • Summary (00:15)
XML and JSON structure (09:59)
  • Introduction (00:20)
  • XML Structure (01:36)
  • Demo: XML (03:40)
  • JSON Structure (01:23)
  • Demo: JSON (02:45)
  • Summary (00:12)
Generating XML and JSON (17:13)
  • Introduction (00:17)
  • Generating XML (01:51)
  • Demo: Generate XML (04:49)
  • Generating JSON (02:46)
  • Demo: Generate JSON (04:33)
  • Demo: Print to File (02:41)
  • Summary (00:14)
Parsing XML and JSON (19:05)
  • Introduction (00:26)
  • Parsing XML (02:38)
  • Demo: Parse XML (04:36)
  • Demo: XML Output (02:20)
  • Parsing JSON (02:55)
  • Demo: Parse JSON (05:52)
  • Summary (00:15)
Implementing Algorithms (18:55)
  • Introduction (00:32)
  • Python 3 (00:12)
  • Algorithm Implementation (00:36)
  • Towers of Hanoi (06:04)
  • Demo: Towers of Hanoi Animation (03:12)
  • Demo: Towers of Hanoi Algorithm (04:34)
  • Demo: Run Program (03:18)
  • Summary (00:24)