User Manual
CircuitPython Libraries
Each CircuitPython program you run needs to have a lot of information to work. The reason CircuitPython is so simple
to use is that most of that information is stored in other files and works in the background. These files are called
libraries
. Some of them are built into CircuitPython. Others are stored on your CIRCUITPY drive in a folder called lib.
Part of what makes CircuitPython so awesome is its ability to store code separately from the firmware itself. Storing
code separately from the firmware makes it easier to update both the code you write and the libraries you depend.
Your board may ship with a lib folder already, it's in the base directory of the drive. If not, simply create the folder
yourself.
CircuitPython libraries work in the same was as regular Python modules so the Python docs (https://adafru.it/rar) are a
great reference for how it all should work. In Python terms, we can place our library files in the lib directory because its
part of the Python path by default.
One downside of this approach of separate libraries is that they are not built in. To use them, one needs to copy them
to the CIRCUITPY drive before they can be used. Fortunately, we provide a bundle full of our libraries.
Our bundle and releases also feature optimized versions of the libraries with the .mpy file extension. These files take
less space on the drive and have a smaller memory footprint as they are loaded.
Installing the CircuitPython Library Bundle
As we continue to develop CircuitPython and create new releases, we will stop supporting older releases.
Visit https://circuitpython.org/downloads to download the latest version of CircuitPython for your board. You
must download the CircuitPython Library Bundle that matches your version of CircuitPython. Please update
CircuitPython and then visit https://circuitpython.org/libraries to download the latest Library Bundle.
© Adafruit Industries https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi Page 53 of 187