Python standard libraries and micro-libraries¶
The libraries below are inherited from MicroPython. They are similar to the standard Python libraries with the same name. They implement a subset of or a variant of the corresponding standard Python library.
CircuitPython’s long-term goal is that code written in CircuitPython using Python standard libraries will be runnable on CPython without changes.
These libraries are not enabled on CircuitPython builds with
limited flash memory, usually on non-Express builds:
These libraries are not currently enabled in any CircuitPython build, but may be in the future:
builtins– builtin functions and exceptions
heapq– heap queue algorithm
array– arrays of numeric data
binascii– binary/ASCII conversions
collections– collection and container types
errno– system error codes
gc– control the garbage collector
io– input/output streams
json– JSON encoding and decoding
re– simple regular expressions
sys– system specific functions
uctypes– access binary data in a structured way
select– wait for events on a set of streams
Omitted functions in the
A few string operations are not enabled on small builds
(usually non-Express), due to limited flash memory:
Functionality specific to the CircuitPython/MicroPython implementation is available in the following libraries. These libraries may change significantly or be removed in future versions of CircuitPython.