This is a repository of libraries designed to be useful for writing MicroPython applications.
 
 
Go to file
Paul Sokolovsky 8392bd8ea5 pickle: Release 0.1. 2018-01-21 14:51:45 +02:00
__future__
_libc
_markupbase
abc
argparse
array array: Add placeholder module. 2017-12-10 17:27:59 +02:00
asyncio
asyncio_slow asyncio_slow: Rename examples as such. 2017-09-30 18:40:23 +03:00
base64 base64: Add missing dependencies. 2017-08-12 08:46:38 +03:00
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 datetime: Release 3.3.3-1. 2017-12-21 18:54:16 +02:00
dbm
decimal
difflib
dis dis: Add placeholder module. 2017-12-12 12:17:00 +02:00
dummy_threading dummy_threading: Add placeholder module. 2017-12-10 17:28:52 +02:00
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 hashlib: Release 2.4.0-4. 2018-01-20 11:51:02 +02:00
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
math math: Add placeholder module. 2017-12-14 09:46:45 +02:00
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: Release 0.1. 2018-01-21 14:51:45 +02:00
pickletools
pkg_resources pkg_resources: Release 0.2.1. 2017-06-10 16:16:29 +03:00
pkgutil
platform
poplib
posixpath
pprint pprint: Release 0.0.4. 2017-05-11 21:21:23 +03:00
profile
pty
pwd pwd: add basic implementation of pwd 2017-10-03 22:18:27 +03:00
pyb
pystone
pystone_lowmem
queue
quopri all: setup.py: New releases for gzip 4k conversion. 2016-10-11 06:47:01 +03:00
random random: Release 0.2. 2017-11-26 00:04:07 +02:00
re-pcre re-pcre: Release 0.2.5. 2017-07-06 00:15:54 +03:00
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 socket: Add INADDR_ANY. 2017-06-22 19:59:54 +03:00
socketserver
sqlite3 sqlite3: Add test for CREATE TABLE/INSERT/lastrowid. 2017-08-30 00:11:51 +03:00
ssl ssl: Release 0.1. 2018-01-10 00:13:04 +02: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: Add dummy @requires_IEEE_754 decorator. 2017-11-12 00:32:46 +02: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 typing: Add dummy module. 2017-06-23 15:41:15 +03:00
uaiohttpclient uaiohttpclient: Release 0.5.1. 2018-01-14 11:51:59 +02:00
uasyncio uasyncio: Release 1.4. 2017-12-15 20:25:35 +02:00
uasyncio.core uasyncio.core: Release 1.7.1. 2018-01-07 10:44:13 +02:00
uasyncio.queues
uasyncio.synchro uasyncio.synchro: Release 0.1.1. 2017-12-12 12:12:17 +02:00
uasyncio.udp uasyncio.udp: Release 0.1. 2017-12-16 00:41:17 +02:00
ucontextlib
ucurses
udnspkt udnspkt: Release 0.1. 2017-12-17 20:56:13 +02:00
umqtt.robust umqtt.robust: Elaborate README. 2017-06-07 20:28:30 +03:00
umqtt.simple umqtt.simple: Release 1.3.4. 2017-06-27 21:18:43 +03:00
unicodedata unicodedata: Release 0.0.3. 2017-11-09 19:15:47 +02:00
unittest unittest: Release 0.3.1. 2017-09-22 22:20:14 +03:00
upip upip: Add copyright header. 2018-01-07 16:17:17 +02:00
upysh
urequests urequests: Release 0.5.2. 2018-01-14 11:34:44 +02:00
urllib
urllib.parse
urllib.urequest urllib.urequest: Release 0.5.1. 2018-01-14 11:41:14 +02: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 README: Mention that some modules may require pfalcon's fork. 2018-01-07 16:04:59 +02:00
make_metadata.py make_metadata: Use more specific 'micropython-lib Developers'. 2018-01-07 16:27:47 +02:00
optimize_upip.py optimize_upip.py: Rework inclusion/exclusion logic. 2017-05-05 13:01:54 +03:00
sdist_upip.py sdist_upip: Don't treat files at the toplevel dir as resources. 2017-12-15 00:20:59 +02:00

README.md

micropython-lib

micropython-lib is a project to develop a non-monolothic standard library for "advanced" MicroPython fork (https://github.com/pfalcon/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 the aforementioned fork of MicroPython. Actual system requirements vary per module. Majority of modules are compatible with the upstream MicroPython, though some may require additional functionality/optimizations present in the "advanced" fork. Modules not related to I/O may also work without problems on bare-metal ports, not just on "Unix" port (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: