2017-07-01 15:09:40 -04:00
|
|
|
.. _micropython_lib:
|
|
|
|
|
2018-05-22 20:49:08 -04:00
|
|
|
MicroPython libraries
|
2015-06-04 18:53:26 -04:00
|
|
|
=====================
|
2014-10-30 21:37:19 -04:00
|
|
|
|
2018-05-22 19:52:01 -04:00
|
|
|
Python standard libraries and micro-libraries
|
|
|
|
---------------------------------------------
|
2017-05-14 17:26:44 -04:00
|
|
|
|
2021-01-25 23:06:47 -05:00
|
|
|
The libraries below are inherited from MicroPython.
|
2021-01-24 22:49:28 -05:00
|
|
|
They are similar to the standard Python libraries with the same name.
|
2018-05-22 20:49:08 -04:00
|
|
|
They implement a subset of or a variant of the corresponding
|
|
|
|
standard Python library.
|
2018-02-20 20:34:59 -05:00
|
|
|
|
2020-12-09 10:52:18 -05:00
|
|
|
CircuitPython's long-term goal is that code written in CircuitPython
|
2018-05-22 20:49:08 -04:00
|
|
|
using Python standard libraries will be runnable on CPython without changes.
|
|
|
|
|
2021-01-24 22:49:28 -05:00
|
|
|
These libraries are not enabled on CircuitPython builds with
|
2018-05-22 19:52:01 -04:00
|
|
|
limited flash memory, usually on non-Express builds:
|
2021-01-24 22:49:28 -05:00
|
|
|
``binascii``, ``errno``, ``json``, ``re``.
|
2018-05-22 19:52:01 -04:00
|
|
|
|
2021-01-24 22:49:28 -05:00
|
|
|
These libraries are not currently enabled in any CircuitPython build, but may be in the future,
|
|
|
|
with the ``u`` prefix dropped:
|
2021-01-25 23:06:47 -05:00
|
|
|
``uctypes``, ``uhashlib``, ``uzlib``.
|
2018-02-20 20:34:59 -05:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
|
|
|
|
builtins.rst
|
2018-05-22 19:52:01 -04:00
|
|
|
uheapq.rst
|
2018-02-20 20:34:59 -05:00
|
|
|
array.rst
|
2018-05-03 10:34:43 -04:00
|
|
|
binascii.rst
|
2018-05-14 14:31:56 -04:00
|
|
|
collections.rst
|
2021-01-24 22:49:28 -05:00
|
|
|
errno.rst
|
2018-05-22 19:52:01 -04:00
|
|
|
gc.rst
|
2018-05-06 13:23:21 -04:00
|
|
|
hashlib.rst
|
2021-01-24 22:49:28 -05:00
|
|
|
io.rst
|
|
|
|
json.rst
|
|
|
|
re.rst
|
2018-05-22 19:52:01 -04:00
|
|
|
sys.rst
|
2021-01-24 22:49:28 -05:00
|
|
|
uctypes.rst
|
2018-02-20 20:34:59 -05:00
|
|
|
uselect.rst
|
|
|
|
usocket.rst
|
|
|
|
ussl.rst
|
|
|
|
uzlib.rst
|
2016-04-26 18:14:16 -04:00
|
|
|
|
2018-05-22 19:52:01 -04:00
|
|
|
Omitted functions in the ``string`` library
|
|
|
|
-------------------------------------------
|
|
|
|
|
2021-01-24 22:49:28 -05:00
|
|
|
A few string operations are not enabled on small builds
|
|
|
|
(usually non-Express), due to limited flash memory:
|
2018-05-22 19:52:01 -04:00
|
|
|
``string.center()``, ``string.partition()``, ``string.splitlines()``,
|
|
|
|
``string.reversed()``.
|
|
|
|
|
2016-04-26 18:14:16 -04:00
|
|
|
|
2018-05-22 19:52:01 -04:00
|
|
|
CircuitPython/MicroPython-specific libraries
|
2018-05-22 21:21:19 -04:00
|
|
|
--------------------------------------------
|
2016-04-26 18:37:45 -04:00
|
|
|
|
2018-05-22 20:49:08 -04:00
|
|
|
Functionality specific to the CircuitPython/MicroPython implementation is available in
|
2020-12-09 10:52:18 -05:00
|
|
|
the following libraries. These libraries may change significantly or be removed in future
|
2020-07-06 10:56:52 -04:00
|
|
|
versions of CircuitPython.
|
2016-04-26 18:37:45 -04:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
|
2017-04-03 17:29:23 -04:00
|
|
|
btree.rst
|
2017-02-27 01:16:32 -05:00
|
|
|
framebuf.rst
|
2016-04-26 18:37:45 -04:00
|
|
|
micropython.rst
|