Python standard libraries¶
The libraries below implement a subset of the corresponding standard Python (CPython) library. They are implemented in C, not Python.
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:
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
platform– access to underlying platform’s identifying data
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
A few string operations are not enabled on small builds
due to limited flash memory:
Functionality specific to the CircuitPython/MicroPython implementations is available in the following libraries.