Collecting a Photo Catalog from an API is a practical Python project for learners who can already write small programs. Help a community photo-library editor turn a first-page preview into a complete, filtered CSV catalog. You will build a reusable client for a prepared local HTTP API and keep an earlier complete export safe when a later request fails.
Two Guided Labs take you from reading one response to following every cursor, removing duplicate IDs, and publishing a complete result. An independent Challenge applies the same methods to a different collection, page size, and selection. Each unit starts with its own prepared environment. Allow roughly 110–150 minutes; this is an author estimate, not a measured beginner completion time.
What You Will Learn
After completing this course, you will be able to:
- request JSON records over HTTP, encode query parameters, use a request timeout, and distinguish successful responses from HTTP errors;
- treat pagination cursors as opaque values and continue until
next_cursorisnull, including after empty or short pages; - keep one record per stable photo ID while preserving different photos that share a title;
- apply exact, case-sensitive category and orientation filters and write all five record fields as valid UTF-8 CSV, including a header-only result when nothing matches;
- reject a failed request or repeated-cursor cycle with a nonzero exit, preserving the previous complete output;
- publish a successful export through a unique temporary file in the output directory, without overwriting unrelated neighboring files;
- reuse the same program with a different supplied collection URL, page size, filters, and output path.
Who This Course Is For
This course is for Python learners who want to turn familiar loops and collections into a useful API client and a reusable data file.
Prerequisites: Python functions, collections, loops, exceptions, basic file output, and basic terminal use. Planning a Picnic Shopping List or equivalent experience is suitable preparation. HTTP, JSON response structure, URL encoding, cursors, CSV quoting, and temporary-file replacement are explained in the Guided Labs.
Learning environment: LabEx provides a browser-based Python editor, terminal, and an original local demonstration API. The catalog uses synthetic illustrations and fictional credits. Source data, service code, and media stay unchanged; only the explicitly documented demonstration failure and cycle controls may be used to exercise errors and recovery. Runtime labels and output remain in English.
Frequently Asked Questions
Do I need an external account or an API key?
No. Requests go to the prepared local demonstration service. You do not contact a hosted photo provider, scrape external websites, or implement authentication.
Will I build a website or download photos?
No. You write the Python client and export photo metadata as CSV. The supplied illustrations make the records recognizable; image downloading, drawing, and website development are outside this project.
What happens if collection stops halfway?
The client must exit with an error and preserve an existing complete export. After restoring the demonstration service, you start a new finite batch. Automatic retries and resuming interrupted batches are outside the course. Local file replacement is not a promise of power-loss durability or concurrent-writer coordination.
How does the Challenge extend the Guided Labs?
You collect a different collection with different parameters and matching records on its final page. The tools, pagination rules, filtering, CSV format, and failure-handling methods have already been taught.

