This is a repository of libraries designed to be useful for writing MicroPython applications.
 
 
Go to file
Paul Sokolovsky dd30302f4b gettext: Release 0.1. 2017-11-05 12:51:47 +02:00
__future__
_libc
_markupbase
abc
argparse
asyncio
asyncio_slow asyncio_slow: Rename examples as such. 2017-09-30 18:40:23 +03:00
base64
binascii binascii: Add test which exposes to_bytes() problem in the module. 2017-08-15 10:26:25 +03:00
binhex
bisect
calendar
cgi
cmd
code code: Release 0.0.0. 2017-10-29 00:15:10 +03:00
codecs codecs: Add dummy module. 2017-08-26 10:28:41 +03:00
codeop codeop: Release 0.0.0. 2017-10-29 10:42:30 +03:00
collections
collections.defaultdict
collections.deque
concurrent.futures
contextlib
copy
cpython-uasyncio
csv
curses
curses.ascii
datetime
dbm
decimal
difflib
email.charset
email.encoders
email.errors
email.feedparser
email.header
email.internal
email.message
email.parser
email.utils
errno
fcntl
ffilib
fnmatch fnmatch: test_fnmatch: Disable tests for bytes arguments. 2017-10-11 20:12:21 +03:00
formatter
fractions
ftplib
functools functools: Release 0.0.7. 2017-11-05 12:35:45 +02:00
getopt
getpass
gettext gettext: Release 0.1. 2017-11-05 12:51:47 +02:00
glob glob: test_glob: Consistently disable tests for bytes arguments. 2017-10-10 17:30:41 +03:00
gzip
hashlib
heapq
hmac hmac: Calculate correct digest when non-trivial key is used. 2017-08-13 14:52:52 +03:00
html
html.entities
html.parser
http.client http.client: Rename examples as such. 2017-09-27 00:34:43 -07:00
imaplib
imp
importlib importlib: Release 0.0.0. 2017-10-29 00:11:15 +03:00
inspect
io io: Release 0.1. 2017-10-21 21:36:44 +03:00
ipaddress
itertools
json
keyword
linecache
locale
logging
machine
mailbox
mailcap
mimetypes
multiprocessing multiprocessing: Release 0.1.2. 2017-09-03 11:11:39 +03:00
nntplib
numbers
operator operator: Add bunch of operator synonym functions. 2017-09-28 09:33:16 -07:00
optparse
os os: test_filestat.py: Use paths relative to module dir. 2017-10-13 20:24:35 +03:00
os.path os.path: test_path.py: Use paths relative to module dir. 2017-10-18 14:03:05 +03:00
pathlib
pdb
pickle pickle: Add dummy HIGHEST_PROTOCOL, accept dummy proto in dump, dumps. 2017-10-22 19:50:20 +03:00
pickletools
pkg_resources
pkgutil
platform
poplib
posixpath
pprint
profile
pty
pwd pwd: add basic implementation of pwd 2017-10-03 22:18:27 +03:00
pyb
pystone
pystone_lowmem
queue
quopri
random
re-pcre
readline readline: Release 0.0.0. 2017-10-28 23:16:31 +03:00
reprlib
runpy
sched
select select: Convert float timeout to int with math.ceil. 2017-10-29 10:01:00 +03:00
selectors
shelve
shlex
shutil
signal
smtplib
socket
socketserver
sqlite3 sqlite3: Add test for CREATE TABLE/INSERT/lastrowid. 2017-08-30 00:11:51 +03:00
ssl ssl: Release 0.0.1. 2017-08-20 17:59:54 +03:00
stat
statistics
string
stringprep
struct
subprocess
sys sys: Add placeholder module. 2017-11-04 00:02:55 +02:00
tarfile
telnetlib
tempfile
test
test.pystone
test.support test.support: Release 0.1.3. 2017-09-23 12:27:49 +03:00
textwrap
threading threading: Release 0.1. 2017-11-01 01:41:54 +02:00
time time: Release 0.5. 2017-09-09 14:02:20 +03:00
timeit
trace
traceback traceback: Release 0.3. 2017-10-03 22:24:13 +03:00
tty
types
typing
uasyncio uasyncio: Release 1.2.3, added initial README. 2017-10-30 01:23:19 +02:00
uasyncio.core uasyncio.core: Release 1.5.1, updated description. 2017-10-28 22:52:15 +03:00
uasyncio.queues
uasyncio.synchro uasyncio.synchro: Add Lock example. 2017-11-03 00:45:57 +02:00
ucontextlib
ucurses
umqtt.robust
umqtt.simple
unicodedata
unittest unittest: Release 0.3.1. 2017-09-22 22:20:14 +03:00
upip upip: Makefile: Remove unused dependencies. 2017-10-12 20:04:29 +03:00
upysh
urequests urequests: Release 0.5. 2017-09-13 18:46:04 +03:00
urllib
urllib.parse
urllib.urequest urllib.urequest: Release 0.5. 2017-09-12 08:44:09 +03:00
utarfile utarfile: Update for str.rstrip() fixes. 2017-09-29 18:19:44 -07:00
uu
uuid
venv venv: Add dummy module. 2017-11-04 23:52:16 +02:00
warnings
weakref
xmltok xmltok: test_xmltok: Find data file relative to module dir. 2017-08-30 00:19:13 +03:00
zipfile
zlib zlib: Add dummy module. 2017-11-04 00:04:11 +02:00
.gitignore
CONTRIBUTING.md
LICENSE
Makefile
README.md
make_metadata.py
optimize_upip.py

README.md

micropython-lib

micropython-lib is a project to develop a non-monolothic standard library for MicroPython (https://github.com/micropython/micropython). Each module or package is available as a separate distribution package from PyPI. Each module comes from one of the following sources (and thus each module has its own licensing terms):

  • written from scratch specifically for MicroPython
  • ported from CPython
  • ported from some other Python implementation, e.g. PyPy
  • some modules actually aren't implemented yet and are dummy

Note that the main target of micropython-lib is a "Unix" port of MicroPython. Actual system requirements vary per module. For example, if a module is not related to I/O, it may work without problems on bare-metal ports too (e.g. pyboard).

Usage

micropython-lib packages are published on PyPI (Python Package Index), the standard Python community package repository: http://pypi.python.org/ . On PyPI, you can search for MicroPython related packages and read additional package information. By convention, all micropython-lib package names are prefixed with "micropython-" (the reverse is not true - some package starting with "micropython-" aren't part of micropython-lib and were released by 3rd parties).

Browse available packages via this URL.

To install packages from PyPI for usage on your local system, use the upip tool, which is MicroPython's native package manager, similar to pip, which is used to install packages for CPython. upip is bundled with MicroPython "Unix" port (i.e. if you build "Unix" port, you automatically have upip tool). Following examples assume that micropython binary is available on your PATH:

$ micropython -m upip install micropython-pystone
...
$ micropython
>>> import pystone
>>> pystone.main()
Pystone(1.2) time for 50000 passes = 0.534
This machine benchmarks at 93633 pystones/second

Run micropython -m upip --help for more information about upip.

Development

To install modules during development, use make install. By default, all available packages will be installed. To install a specific module, add the MOD=<module> parameter to the end of the make install command.

If you would like to trace evolution of MicroPython packaging support, you may find following links useful (note that they may contain outdated information):

Guidelines for packaging MicroPython modules for PyPI: