index.rst 2.4 KB
Newer Older
1
2
MicroPython libraries
=====================
3

4
Functionality specific to the MicroPython implementation is available in
5
6
7
8
9
10
11
the following library.

.. toctree::
   :maxdepth: 1

   micropython.rst

12
13
14
Python standard libraries
-------------------------

15
The following standard Python libraries are built in to MicroPython.
16
17
18
19

For additional libraries, please download them from the `micropython-lib repository
<https://github.com/micropython/micropython-lib>`_.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. only:: port_pyboard

    .. toctree::
       :maxdepth: 1
    
       cmath.rst
       gc.rst
       math.rst
       os.rst
       select.rst
       struct.rst
       sys.rst
       time.rst

.. only:: port_wipy
35

36
37
38
39
40
41
42
43
    .. toctree::
       :maxdepth: 1
    
       gc.rst
       os.rst
       select.rst
       sys.rst
       time.rst
44

45
46
47
48
Python micro-libraries
----------------------

The following standard Python libraries have been "micro-ified" to fit in with
49
the philosophy of MicroPython.  They provide the core functionality of that
50
51
52
53
54
55
56
57
module and are intended to be a drop-in replacement for the standard Python
library.

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.
58

59
.. only:: port_pyboard
60

61
62
63
64
65
66
67
68
69
70
71
   .. toctree::
      :maxdepth: 1
    
      ubinascii.rst
      uctypes.rst
      uhashlib.rst
      uheapq.rst
      ujson.rst
      ure.rst
      usocket.rst
      uzlib.rst
72

73
.. only:: port_pyboard
74

75
76
   Libraries specific to the pyboard
   ---------------------------------
77

78
   The following libraries are specific to the pyboard.
79

80
81
   .. toctree::
      :maxdepth: 2
82

83
84
      pyb.rst
      network.rst
85

86
87
88
89
.. only:: port_wipy

   .. toctree::
      :maxdepth: 1
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
      ubinascii.rst
      ujson.rst
      ure.rst
      usocket.rst

.. only:: port_wipy

   Libraries specific to the WiPy
   ---------------------------------

   The following libraries are specific to the WiPy.

   .. toctree::
      :maxdepth: 2

106
      machine.rst
107
      network.rst
108

109
110
111

.. only:: port_esp8266

112
113
   Libraries specific to the ESP8266
   ---------------------------------
114

115
   The following libraries are specific to the ESP8266.
116

117
118
   .. toctree::
      :maxdepth: 2
119

120
121
      pyb.rst
      esp.rst
122
      network.rst