You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-22Lines changed: 7 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -4,45 +4,30 @@ micropython-lib
4
4
This is a repository of libraries designed to be useful for writing
5
5
MicroPython applications.
6
6
7
-
The libraries here fall into roughly four categories:
7
+
The libraries here fall into four categories corresponding to the four top-level directories:
8
8
9
-
* Compatible ports of CPython standard libraries. These should be drop-in replacements for the CPython libraries, although many have reduced functionality or missing methods or classes (which may not be an issue for many use cases).
9
+
***python-stdlib**: Compatible versions of modules from the [Python Standard Library](https://docs.python.org/3/library/). These should be drop-in replacements for the Python libraries, although many have reduced functionality or missing methods or classes (which may not be an issue for many most cases).
10
10
11
-
*"Micro" versions of CPython standard libraries with limited compatibility. These can often provide the same functionality, but might require some code changes compared to the CPython version.
11
+
***python-ecosys**: Compatible, but reduced-functionality versions of modules from the larger Python ecosystem, for example that might be found in the [Python Package Index](https://pypi.org/).
12
12
13
-
* MicroPython-specific libraries. These include drivers and other libraries targeted at running Python on hardware or embedded systems.
13
+
***micropython**: MicroPython-specific modules that do not have equivalents in other Python environments. These are typically hardware drivers or highly-optimised alternative implementations of functionality available in other Python modules.
14
14
15
-
*MicroPython-on-Unix-specific libraries. These extend the functionality of the Unix port to allow access to operating-system level functionality (which allows more CPython compatibility).
15
+
***unix-ffi**: These modules are specifically for the MicroPython Unix port and provide access to operating-system and third-party libraries via FFI.
16
16
17
17
Usage
18
18
-----
19
19
20
20
Many libraries are self contained modules, and you can quickly get started by
21
21
copying the relevant Python file to your device. For example, to add the
22
-
`base64` library, you can directly copy `base64/base64.py` to the `lib`
22
+
`base64` library, you can directly copy `python-stdlib/base64/base64.py` to the `lib`
23
23
directory on your device.
24
24
25
25
Other libraries are packages, in which case you'll need to copy the directory instead. For example, to add `collections.defaultdict`, copy `collections/collections/__init__.py` and `collections.defaultdict/collections/defaultdict.py` to a directory named `lib/collections` on your device.
26
26
27
-
For devices that have network connectivity (e.g. PYBD, ESP8266, ESP32), they
0 commit comments