Skip to content

Commit 35e3c9e

Browse files
committed
python-ecosys: Move urequests to python-ecosys.
Signed-off-by: Jim Mussared <[email protected]>
1 parent bc2b6b0 commit 35e3c9e

File tree

6 files changed

+8
-31
lines changed

6 files changed

+8
-31
lines changed

README.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,30 @@ micropython-lib
44
This is a repository of libraries designed to be useful for writing
55
MicroPython applications.
66

7-
The libraries here fall into roughly four categories:
7+
The libraries here fall into four categories corresponding to the four top-level directories:
88

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).
1010

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/).
1212

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

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

1717
Usage
1818
-----
1919

2020
Many libraries are self contained modules, and you can quickly get started by
2121
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`
2323
directory on your device.
2424

2525
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.
2626

27-
For devices that have network connectivity (e.g. PYBD, ESP8266, ESP32), they
28-
will have the `upip` module installed.
29-
30-
```
31-
>>> import upip
32-
>>> upip.install('micropython-base64')
33-
>>> upip.install('micropython-collections.defaultdict')
34-
...
35-
>>> import base64
36-
>>> base64.b64decode('aGVsbG8sIG1pY3JvcHl0aG9u')
37-
b'hello, micropython'
38-
>>> from collections import defaultdict
39-
>>> d = defaultdict(int)
40-
>>> d[a] += 1
41-
```
42-
4327
Future plans (and new contributor ideas)
4428
----------------------------------------
4529

4630
* Provide compiled .mpy distributions.
4731
* Develop a set of example programs using these libraries.
4832
* Develop more MicroPython libraries for common tasks.
33+
* Provide a replacement for the previous `upip` tool.
File renamed without changes.

python-stdlib/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ The libraries in this directory aim to provide compatible implementations of
55
standard libraries to allow existing Python code to run un-modified on
66
MicroPython.
77

8-
Compatibility ranges from:
9-
10-
* Many commonly-used methods and classes are provided with identical runtime semantics.
11-
* A subset of methods and classes, with identical semantics for most use cases.
12-
* Additional constants not provided in the main firmware (to keep size down).
13-
* Stub methods and classes required to make code load without error, but may lead to runtime errors.
14-
15-
168
Implementation
179
--------------
1810

@@ -21,7 +13,7 @@ CPython implementation. (e.g. `collections.defaultdict`)
2113

2214
Some libraries are based on or extend from the built-in "micro" modules in the
2315
MicroPython firmware, providing additional functionality that didn't need to
24-
be written in C. (e.g. `socket`, `struct`)
16+
be written in C (e.g. `collections`, `socket`, `struct`).
2517

2618

2719
Future plans (ideas for contributors):

0 commit comments

Comments
 (0)