AI Instructor Live Labs Included

Working with Files and APIs in Python

Connect Python to the real world — JSON, CSV, REST APIs, error handling, and configuration. Build a complete data pipeline as your capstone.

Beginner
10h 35m
12 Lessons
PY-300
Working with Files and APIs in Python Badge

View badge details

About This Course

Make Python practical by learning to interact with external data sources and services. You'll parse JSON and CSV files, consume REST APIs with the requests library, handle errors gracefully with try/except and logging, and manage application configuration with environment variables. The course culminates in a capstone project where you build a complete CLI data pipeline that fetches API data, transforms it with classes and comprehensions, and outputs CSV and JSON reports. Requires Python Data Structures and OOP or equivalent experience. This is Course 3 of 3 in the Python Beginner Track.

Course Curriculum

12 Lessons
01
AI Lesson
AI Lesson

JSON Reading and Writing Structured Data

30m

json.loads/load/dumps/dump, navigating nested JSON, type mapping, JSONDecodeError, indent/default parameters

02
Lab Exercise
Lab Exercise

JSON - Lab Exercises

1h 15m 1 Exercises

json.loads/load/dumps/dump, navigating nested JSON, JSON-Python type mapping, JSONDecodeError handling, indent/default parameters

JSON Reading and Writing Structured Data JSON Reading and Writing Structured Data ~30 min
03
AI Lesson
AI Lesson

CSV and Tabular Data

30m

csv.reader, csv.DictReader, csv.writer, csv.DictWriter, headers/delimiters/encoding, streaming large files

04
Lab Exercise
Lab Exercise

CSV and Tabular Data - Lab Exercises

1h 15m 1 Exercises

csv.reader, csv.DictReader, csv.writer, csv.DictWriter, handling headers/delimiters/encoding, streaming large files with generators

Working with CSV and Tabular Data in Python Working with CSV and Tabular Data in Python ~30 min
05
AI Lesson
AI Lesson

Error Handling and Exceptions

35m

try/except/else/finally, catching specific exceptions, exception hierarchy, custom exceptions, logging module, EAFP vs LBYL

06
Lab Exercise
Lab Exercise

Error Handling - Lab Exercises

1h 15m 1 Exercises

try/except/else/finally, catching specific exceptions, exception hierarchy, custom exceptions, logging module basics, EAFP vs LBYL

Error Handling and Exceptions in Python File Operations Error Handling and Exceptions in Python File Operations ~30 min
07
AI Lesson
AI Lesson

HTTP and REST APIs with requests

35m

requests.get/post, status codes, JSON responses, query parameters, headers, auth, raise_for_status, timeouts, pagination

08
Lab Exercise
Lab Exercise

REST APIs - Lab Exercises

1h 15m 1 Exercises

requests.get/post, response.status_code/json()/text, query parameters, headers and auth, raise_for_status(), timeouts, basic pagination

Making HTTP Requests to REST APIs with Python Making HTTP Requests to REST APIs with Python ~30 min
09
AI Lesson
AI Lesson

Environment Variables and Configuration

25m

os.environ/os.getenv, python-dotenv, .env files, configuration hierarchy, secrets hygiene, structured config loading

10
Lab Exercise
Lab Exercise

Configuration - Lab Exercises

1h 15m 1 Exercises

os.environ/os.getenv, python-dotenv and .env files, configuration hierarchy, secrets hygiene and .gitignore, structured config loading

Exercise 1 Exercise 1 ~30 min
11
AI Lesson
AI Lesson

Capstone Briefing - API Data Pipeline

30m

Reviews all beginner track concepts, explains the capstone project requirements for building a complete data pipeline CLI

12
Lab Exercise
Lab Exercise

Capstone - API Data Pipeline

1h 15m 1 Exercises

Capstone project combining all beginner track skills: config management, API consumption with pagination, data transformation with classes and comprehensions, error handling with logging, CSV and JSON output

Capstone - API Data Pipeline Capstone - API Data Pipeline ~30 min

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 6 Hands-on Lessons
  • 6 Months Access
  • Completion Badge
  • Certificate of Completion
Working with Files and APIs in Python Badge

Earn Your Badge

Complete all lessons to unlock the Working with Files and APIs in Python achievement badge.

Category
Skill Level Beginner
Total Duration 10h 35m
Working with Files and APIs in Python Badge
Achievement Badge

Working with Files and APIs in Python

Awarded for completing the Working with Files and APIs in Python course. Demonstrates proficiency in JSON, CSV, REST APIs, error handling, and configuration management.

Course Working with Files and APIs in Python
Criteria Complete all lessons in the Working with Files and APIs in Python course

Skills You'll Earn

Python JSON CSV REST APIs Error Handling Configuration Management

Complete all lessons in this course to earn this badge