Skip to main content
  1. Glossaries/

Module / Package / Library / SDK

·2 mins
Clément Sauvage
Author
Clément Sauvage
I like to make softwares
  • Module: A single file containing code. In Python, it’s a .py file. In JavaScript, it’s typically a .js file. The smallest unit of code organization you can import.
  • Package: A collection of modules organized in a directory structure. Usually has an init.py (Python) or package.json (JavaScript) file that marks it as a package. Think of it as a folder that groups related code together.
  • Library: A collection of reusable code (could be one or many packages) that provides specific functionality. It’s what you import to use someone else’s code. Examples: NumPy, React., loadash
  • SDK (Software Development Kit): A comprehensive package including libraries, tools, documentation, and sometimes sample code for developing with a platform. Examples: Android SDK, AWS SDK.

The distinction between package and library is the most unclear through these definitions. They may sometimes be used interchangeably.

But if we had to further define them to differentiate them, we could say that a package is how code is organized and bundled for sharing. When you run pip install requests or npm install lodash, you’re installing a package, the deliverable unit with metadata, version info, and installation instructions.

A library is more about purpose and usage. It’s a collection of reusable functionality that solves a problem. When you say “I’m using the requests library,” you’re talking about what it does for you, not how it’s packaged.