Standard Libraries
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:
binascii
, errno
, json
, re
.
These libraries are not currently enabled in any CircuitPython build, but may be in the future:
platform
builtins
– builtin functions and exceptionsheapq
– heap queue algorithmarray
– arrays of numeric databinascii
– binary/ASCII conversionscollections
– collection and container typeserrno
– system error codesgc
– control the garbage collectorio
– input/output streamsjson
– JSON encoding and decodingplatform
– access to underlying platform’s identifying datare
– simple regular expressionssys
– system specific functionsselect
– wait for events on a set of streams
Omitted string
functions
A few string operations are not enabled on small builds
due to limited flash memory:
string.center()
, string.partition()
, string.splitlines()
,
string.reversed()
.
CircuitPython/MicroPython-specific libraries
Functionality specific to the CircuitPython/MicroPython implementations is available in the following libraries.