From Python Packages to JavaScript Modules: ESM and CommonJS

Stephen Gruppetta 16 Lessons 2h 13m Updated intermediate js py

The school’s weekly heating digest has grown into a Python package and an entry script. Dev’s tool reports overheating and faults across the main boiler, sports hall, and science block. In this course, you’ll port that tool to JavaScript and learn how a larger JavaScript program connects its files.

You’ll work with ECMAScript (ES) modules and with CommonJS, the older module system used by Halden Heating’s supplied fault-code file. The course follows the same plants and logs as each part of the package takes shape.

By the end of this course, you’ll be able to:

  • Organize a folder of modules behind an explicit entry file, import across the project, and find data beside a module.
  • Control shared module state and load modules when needed or by name.
  • Read CommonJS code and use supplied CommonJS files in your project.
  • Rebuild the three-plant heating digest from the course’s pieces.

You should already know Python packages with __init__.py, absolute imports, and importlib.import_module(). In JavaScript, you should know ES modules with import and export, a project configured with "type": "module", script arguments, await readFile(), async functions, and promises. Familiarity with arrays, objects, loops, and functions will help you follow the report code.

Have current versions of Node.js and Python installed. The examples are checked with Node 26 and Python 3.15. The course focuses on program structure and assumes you can run scripts from a terminal.

Short videos mix with text lessons and exercises. Each video has a text summary below it, and you’ll finish with a project, a quiz, and a summary.

What’s Included:

  • 16 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 4 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses