What are libraries in coding?

iD Tech in action

Coding library definition

Libraries in programming languages are collections of prewritten code that users can use to optimize tasks.

Library examples

Here are a few programming library examples you might encounter in Python, JavaScript, and other languages.

NumPy

Primary Language: Python

Use: NumPy is a library used to make powerful arrays. For machine learning, NumPy divides the data and manipulates it easily.

Meaning, machine learning uses many operations on arrays of data. These data sets often contain thousands of numbers and to iterate through every single value one at a time would be difficult and lengthy. NumPy simplifies all of this!

Matplotlib

Primary Language: Python

Use: Going off of the above, Matplotlib is used with NumPy to help with datasets. Specifically, Matplotlib handles large datasets and comes complete with standard graphing functions. It’s also useful for visualizing values over time.

Basically, Matplotlib is great for plotting and works hand-in-hand with NumPy.

TensorFlow

Primary Language: Python or C++

Use: TensorFlow is a library developed by Google to facilitate the creation and training of machine learning models and neural networks. It can be used to create and train machine learning models.

Keras

Primary Language: Python

Use: Keras is also a library developed to facilitate the creation and training of machine learning models and neural networks. But going off the above, Keras was introduced to simplify TensorFlow. This library can make machine learning significantly easier and it still uses TensorFlow as a backend.

Pillow

Primary Language: Python

Use: In Python, you can use the Pillow library to create bitmap images.

SFML

Primary Language: C++

Use: The Simple and Fast Multimedia Library (SFML) is a library that allows for the creation of images, generation of sound effects, and even connecting of multiple computers! 

p5

Primary Language: JavaScript

Use: p5.js is one of the most well-known JavaScript libraries with tons of built-in code.

p5 play

Primary Language: JavaScript

p5.play is a p5 library for easily adding collisions, animations, and various other features dealing with sprites.

A photo of Ryan

Ryan manages blog content at iD Tech, starting with the company in 2008. He earned his MBA from Santa Clara University after obtaining his Bachelor’s degree from Arizona State. Connect on LinkedIn!