circuitpython/docs/library/index.rst

93 lines
2.5 KiB
ReStructuredText
Raw Normal View History

.. _micropython_lib:
MicroPython libraries
=====================
2018-05-22 19:52:01 -04:00
Python standard libraries and micro-libraries
---------------------------------------------
These libraries are inherited from MicroPython.
They are similar to the standard Python libraries with the same name
or with the "u" prefix dropped.
They implement a subset of or a variant of the corresponding
standard Python library.
.. warning::
Though these MicroPython-based libraries are available in CircuitPython,
their functionality may change in the future, perhaps significantly.
As CircuitPython continues to develop, new versions of these libraries will
be created that are more compliant with the standard Python libraries.
You may need to change your code later if you rely
on any non-standard functionality they currently provide.
2020-12-09 10:52:18 -05:00
CircuitPython's long-term goal is that code written in CircuitPython
using Python standard libraries will be runnable on CPython without changes.
Some libraries below are not enabled on CircuitPython builds with
2018-05-22 19:52:01 -04:00
limited flash memory, usually on non-Express builds:
``uerrno``, ``ure``.
2018-05-22 19:52:01 -04:00
Some libraries are not currently enabled in any CircuitPython build, but may be in the future:
``uio``, ``ujson``, ``uzlib``.
Some libraries are only enabled only WiFi-capable ports (ESP8266, nRF)
because they are typically used for network software:
``binascii``, ``hashlib``, ``uheapq``, ``uselect``, ``ussl``.
Not all of these are enabled on all WiFi-capable ports.
.. toctree::
:maxdepth: 1
builtins.rst
2018-05-22 19:52:01 -04:00
uheapq.rst
array.rst
2018-05-03 10:34:43 -04:00
binascii.rst
collections.rst
2018-05-22 19:52:01 -04:00
gc.rst
2018-05-06 13:23:21 -04:00
hashlib.rst
2018-05-22 19:52:01 -04:00
sys.rst
uerrno.rst
uio.rst
ujson.rst
ure.rst
uselect.rst
usocket.rst
ussl.rst
uzlib.rst
2018-05-22 19:52:01 -04:00
Omitted functions in the ``string`` library
-------------------------------------------
A few string operations are not enabled on CircuitPython
M0 non-Express builds, due to limited flash memory:
2018-05-22 19:52:01 -04:00
``string.center()``, ``string.partition()``, ``string.splitlines()``,
``string.reversed()``.
2018-05-22 19:52:01 -04:00
CircuitPython/MicroPython-specific libraries
2018-05-22 21:21:19 -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
versions of CircuitPython.
.. toctree::
:maxdepth: 1
btree.rst
framebuf.rst
micropython.rst
network.rst
uctypes.rst
Libraries specific to the ESP8266
---------------------------------
The following libraries are specific to the ESP8266.
.. toctree::
:maxdepth: 2
esp.rst