diff options
Diffstat (limited to 'docs/library/index.rst')
-rw-r--r-- | docs/library/index.rst | 152 |
1 files changed, 74 insertions, 78 deletions
diff --git a/docs/library/index.rst b/docs/library/index.rst index 47cd2eeb8e..03e6502d95 100644 --- a/docs/library/index.rst +++ b/docs/library/index.rst @@ -1,59 +1,88 @@ MicroPython libraries ===================== -Functionality specific to the MicroPython implementation is available in -the following library. +The following standard Python libraries are built in to MicroPython. -.. toctree:: - :maxdepth: 1 +For additional libraries, please download them from the `micropython-lib repository +<https://github.com/micropython/micropython-lib>`_. - micropython.rst +Python standard libraries and micro-libraries +--------------------------------------------- -Python standard libraries -------------------------- +The following standard Python libraries have been "micro-ified" to fit in with +the philosophy of MicroPython. They provide the core functionality of that +module and are intended to be a drop-in replacement for the standard Python +library. -The following standard Python libraries are built in to MicroPython. +.. only:: not port_unix -For additional libraries, please download them from the `micropython-lib repository -<https://github.com/micropython/micropython-lib>`_. + The modules are available by their u-name, and also by their non-u-name. The + non-u-name can be overridden by a file of that name in your package path. + For example, ``import json`` will first search for a file ``json.py`` or + directory ``json`` and load that package if it is found. If nothing is found, + it will fallback to loading the built-in ``ujson`` module. .. only:: port_unix .. toctree:: :maxdepth: 1 - + cmath.rst gc.rst math.rst - os.rst - struct.rst + select.rst sys.rst - time.rst + ubinascii.rst + ucollections.rst + uhashlib.rst + uheapq.rst + uio.rst + ujson.rst + uos.rst + ure.rst + usocket.rst + ustruct.rst + utime.rst + uzlib.rst .. only:: port_pyboard .. toctree:: :maxdepth: 1 - + cmath.rst gc.rst math.rst - os.rst select.rst - struct.rst sys.rst - time.rst + ubinascii.rst + ucollections.rst + uhashlib.rst + uheapq.rst + uio.rst + ujson.rst + uos.rst + ure.rst + usocket.rst + ustruct.rst + utime.rst + uzlib.rst .. only:: port_wipy .. toctree:: :maxdepth: 1 - + gc.rst - os.rst select.rst sys.rst - time.rst + ubinascii.rst + ujson.rst + uos.rst + ure.rst + usocket.rst + ussl.rst + utime.rst .. only:: port_esp8266 @@ -62,52 +91,35 @@ For additional libraries, please download them from the `micropython-lib reposit gc.rst math.rst - struct.rst sys.rst - time.rst - -Python micro-libraries ----------------------- + ubinascii.rst + ucollections.rst + uhashlib.rst + uheapq.rst + uio.rst + ujson.rst + uos.rst + ure.rst + usocket.rst + ustruct.rst + utime.rst + uzlib.rst + + +MicroPython-specific libraries +------------------------------ -The following standard Python libraries have been "micro-ified" to fit in with -the philosophy of MicroPython. They provide the core functionality of that -module and are intended to be a drop-in replacement for the standard Python -library. - -.. only:: not port_unix - - The modules are available by their u-name, and also by their non-u-name. The - non-u-name can be overridden by a file of that name in your package path. - For example, ``import json`` will first search for a file ``json.py`` or - directory ``json`` and load that package if it is found. If nothing is found, - it will fallback to loading the built-in ``ujson`` module. - -.. only:: port_pyboard or port_unix - - .. toctree:: - :maxdepth: 1 - - ubinascii.rst - uctypes.rst - uhashlib.rst - uheapq.rst - ujson.rst - ure.rst - usocket.rst - uzlib.rst +Functionality specific to the MicroPython implementation is available in +the following libraries. -.. only:: port_esp8266 +.. toctree:: + :maxdepth: 1 - .. toctree:: - :maxdepth: 1 + machine.rst + micropython.rst + network.rst + uctypes.rst - ubinascii.rst - uctypes.rst - uhashlib.rst - uheapq.rst - ujson.rst - ure.rst - uzlib.rst .. only:: port_pyboard @@ -120,18 +132,6 @@ library. :maxdepth: 2 pyb.rst - network.rst - -.. only:: port_wipy - - .. toctree:: - :maxdepth: 1 - - ubinascii.rst - ujson.rst - ure.rst - usocket.rst - ussl.rst .. only:: port_wipy @@ -143,8 +143,6 @@ library. .. toctree:: :maxdepth: 2 - machine.rst - network.rst wipy.rst @@ -158,6 +156,4 @@ library. .. toctree:: :maxdepth: 2 - network.rst esp.rst - machine.rst |