Software library
Ready-made code for a common task that programmers plug into their own programs.
A software library is a package of code written to solve one kind of problem well, so other programmers do not have to solve it again. There are libraries for handling dates and time zones, drawing charts, resizing images, reading spreadsheets, encrypting data or talking to a payment provider. You add the library to your project and call its functions when you need them.
Modern software is mostly assembled this way. A typical app has a small layer of its own code on top of dozens or hundreds of libraries, called its dependencies. Each language has a package manager that downloads them with one command, like pip install for Python or npm install for JavaScript, and many of those libraries are open source.
The convenience has a cost. Every dependency is code someone else wrote and maintains, so a bug or a security vulnerability in a popular library can affect thousands of apps at once, and an abandoned one can leave a project stuck. That is why teams keep a list of exact versions, update them regularly and use tools that warn about known problems.
Keep in mind
- Reusable code for a specific task, called from your own program.
- Installed with a package manager such as pip or npm.
- Most apps rely on many libraries, known as dependencies.
- A flaw in a popular library can affect many apps at once.