Core Python libraries ported to MicroPython
Python Other
Clone or download
Latest commit f20d89c Feb 25, 2018
Permalink
Failed to load latest commit information.
__future__ all: setup.py: Switch to sdist_upip. Feb 2, 2018
_libc all: setup.py: Switch to sdist_upip. Feb 2, 2018
_markupbase all: setup.py: Switch to sdist_upip. Feb 2, 2018
abc all: setup.py: Switch to sdist_upip. Feb 2, 2018
argparse all: setup.py: Switch to sdist_upip. Feb 2, 2018
array all: setup.py: Switch to sdist_upip. Feb 2, 2018
asyncio all: setup.py: Switch to sdist_upip. Feb 2, 2018
asyncio_slow asyncio_slow: Rename examples as such. Sep 30, 2017
base64 all: setup.py: Switch to sdist_upip. Feb 2, 2018
binascii all: setup.py: Switch to sdist_upip. Feb 2, 2018
binhex all: setup.py: Switch to sdist_upip. Feb 2, 2018
bisect bisect: Add module from CPython 3.3.3. May 9, 2014
calendar all: setup.py: Switch to sdist_upip. Feb 2, 2018
cgi all: setup.py: Switch to sdist_upip. Feb 2, 2018
cmd all: setup.py: Switch to sdist_upip. Feb 2, 2018
code all: setup.py: Switch to sdist_upip. Feb 2, 2018
codecs all: setup.py: Switch to sdist_upip. Feb 2, 2018
codeop all: setup.py: Switch to sdist_upip. Feb 2, 2018
collections.defaultdict all: setup.py: Switch to sdist_upip. Feb 2, 2018
collections.deque all: setup.py: Switch to sdist_upip. Feb 2, 2018
collections all: setup.py: Switch to sdist_upip. Feb 2, 2018
concurrent.futures all: setup.py: Switch to sdist_upip. Feb 2, 2018
contextlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
copy all: setup.py: Switch to sdist_upip. Feb 2, 2018
cpython-uasyncio all: setup.py: Switch to sdist_upip. Feb 2, 2018
csv all: setup.py: Switch to sdist_upip. Feb 2, 2018
curses.ascii all: setup.py: Switch to sdist_upip. Feb 2, 2018
curses all: setup.py: Switch to sdist_upip. Feb 2, 2018
datetime all: setup.py: Switch to sdist_upip. Feb 2, 2018
dbm all: setup.py: Switch to sdist_upip. Feb 2, 2018
decimal all: setup.py: Switch to sdist_upip. Feb 2, 2018
difflib all: setup.py: Switch to sdist_upip. Feb 2, 2018
dis all: setup.py: Switch to sdist_upip. Feb 2, 2018
dummy_threading all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.charset all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.encoders all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.errors all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.feedparser all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.header all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.internal all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.message all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.parser all: setup.py: Switch to sdist_upip. Feb 2, 2018
email.utils all: setup.py: Switch to sdist_upip. Feb 2, 2018
errno all: setup.py: Switch to sdist_upip. Feb 2, 2018
fcntl all: setup.py: Switch to sdist_upip. Feb 2, 2018
ffilib all: setup.py: Switch to sdist_upip. Feb 2, 2018
fnmatch all: setup.py: Switch to sdist_upip. Feb 2, 2018
formatter all: setup.py: Switch to sdist_upip. Feb 2, 2018
fractions all: setup.py: Switch to sdist_upip. Feb 2, 2018
ftplib all: setup.py: Switch to sdist_upip. Feb 2, 2018
functools all: setup.py: Switch to sdist_upip. Feb 2, 2018
getopt all: setup.py: Switch to sdist_upip. Feb 2, 2018
getpass all: setup.py: Switch to sdist_upip. Feb 2, 2018
gettext all: setup.py: Switch to sdist_upip. Feb 2, 2018
glob all: setup.py: Switch to sdist_upip. Feb 2, 2018
gzip all: setup.py: Switch to sdist_upip. Feb 2, 2018
hashlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
heapq all: setup.py: Switch to sdist_upip. Feb 2, 2018
hmac all: setup.py: Switch to sdist_upip. Feb 2, 2018
html.entities all: setup.py: Switch to sdist_upip. Feb 2, 2018
html.parser all: setup.py: Switch to sdist_upip. Feb 2, 2018
html all: setup.py: Switch to sdist_upip. Feb 2, 2018
http.client all: setup.py: Switch to sdist_upip. Feb 2, 2018
imaplib all: setup.py: Switch to sdist_upip. Feb 2, 2018
imp all: setup.py: Switch to sdist_upip. Feb 2, 2018
importlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
inspect all: setup.py: Switch to sdist_upip. Feb 2, 2018
io all: setup.py: Switch to sdist_upip. Feb 2, 2018
ipaddress all: setup.py: Switch to sdist_upip. Feb 2, 2018
itertools all: setup.py: Switch to sdist_upip. Feb 2, 2018
json json: Add simple test. Apr 19, 2014
keyword keyword: Work around lack of frozenset. Apr 13, 2014
linecache all: setup.py: Switch to sdist_upip. Feb 2, 2018
locale all: setup.py: Switch to sdist_upip. Feb 2, 2018
logging logging: Release 0.3. May 11, 2018
machine all: setup.py: Switch to sdist_upip. Feb 2, 2018
mailbox all: setup.py: Switch to sdist_upip. Feb 2, 2018
mailcap all: setup.py: Switch to sdist_upip. Feb 2, 2018
math all: setup.py: Switch to sdist_upip. Feb 2, 2018
mimetypes all: setup.py: Switch to sdist_upip. Feb 2, 2018
multiprocessing all: setup.py: Switch to sdist_upip. Feb 2, 2018
nntplib all: setup.py: Switch to sdist_upip. Feb 2, 2018
numbers all: setup.py: Switch to sdist_upip. Feb 2, 2018
operator all: setup.py: Switch to sdist_upip. Feb 2, 2018
optparse all: setup.py: Switch to sdist_upip. Feb 2, 2018
os.path all: setup.py: Switch to sdist_upip. Feb 2, 2018
os all: setup.py: Switch to sdist_upip. Feb 2, 2018
pathlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
pdb all: setup.py: Switch to sdist_upip. Feb 2, 2018
pickle all: setup.py: Switch to sdist_upip. Feb 2, 2018
pickletools all: setup.py: Switch to sdist_upip. Feb 2, 2018
pkg_resources all: setup.py: Switch to sdist_upip. Feb 2, 2018
pkgutil all: setup.py: Switch to sdist_upip. Feb 2, 2018
platform all: setup.py: Switch to sdist_upip. Feb 2, 2018
poplib all: setup.py: Switch to sdist_upip. Feb 2, 2018
posixpath all: setup.py: Switch to sdist_upip. Feb 2, 2018
pprint all: setup.py: Switch to sdist_upip. Feb 2, 2018
profile all: setup.py: Switch to sdist_upip. Feb 2, 2018
pty all: setup.py: Switch to sdist_upip. Feb 2, 2018
pwd all: setup.py: Switch to sdist_upip. Feb 2, 2018
pyb pyb: Add LED blink example. Apr 5, 2015
pystone all: setup.py: Switch to sdist_upip. Feb 2, 2018
pystone_lowmem all: setup.py: Switch to sdist_upip. Feb 2, 2018
queue all: setup.py: Switch to sdist_upip. Feb 2, 2018
quopri all: setup.py: Switch to sdist_upip. Feb 2, 2018
random all: setup.py: Switch to sdist_upip. Feb 2, 2018
re-pcre all: setup.py: Switch to sdist_upip. Feb 2, 2018
readline all: setup.py: Switch to sdist_upip. Feb 2, 2018
reprlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
runpy all: setup.py: Switch to sdist_upip. Feb 2, 2018
sched all: setup.py: Switch to sdist_upip. Feb 2, 2018
select all: setup.py: Switch to sdist_upip. Feb 2, 2018
selectors all: setup.py: Switch to sdist_upip. Feb 2, 2018
shelve all: setup.py: Switch to sdist_upip. Feb 2, 2018
shlex all: setup.py: Switch to sdist_upip. Feb 2, 2018
shutil all: setup.py: Switch to sdist_upip. Feb 2, 2018
signal all: setup.py: Switch to sdist_upip. Feb 2, 2018
smtplib all: setup.py: Switch to sdist_upip. Feb 2, 2018
socket all: setup.py: Switch to sdist_upip. Feb 2, 2018
socketserver all: setup.py: Switch to sdist_upip. Feb 2, 2018
sqlite3 all: setup.py: Switch to sdist_upip. Feb 2, 2018
ssl all: setup.py: Switch to sdist_upip. Feb 2, 2018
stat all: setup.py: Switch to sdist_upip. Feb 2, 2018
statistics all: setup.py: Switch to sdist_upip. Feb 2, 2018
string all: setup.py: Switch to sdist_upip. Feb 2, 2018
stringprep all: setup.py: Switch to sdist_upip. Feb 2, 2018
struct all: setup.py: Switch to sdist_upip. Feb 2, 2018
subprocess all: setup.py: Switch to sdist_upip. Feb 2, 2018
sys all: setup.py: Switch to sdist_upip. Feb 2, 2018
tarfile all: setup.py: Switch to sdist_upip. Feb 2, 2018
telnetlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
tempfile all: setup.py: Switch to sdist_upip. Feb 2, 2018
test.pystone all: setup.py: Switch to sdist_upip. Feb 2, 2018
test.support all: setup.py: Switch to sdist_upip. Feb 2, 2018
test test: test_pep380.py: Update to pass on MicroPython. Jul 7, 2015
textwrap all: setup.py: Switch to sdist_upip. Feb 2, 2018
threading all: setup.py: Switch to sdist_upip. Feb 2, 2018
time all: setup.py: Switch to sdist_upip. Feb 2, 2018
timeit all: setup.py: Switch to sdist_upip. Feb 2, 2018
trace all: setup.py: Switch to sdist_upip. Feb 2, 2018
traceback all: setup.py: Switch to sdist_upip. Feb 2, 2018
tty all: setup.py: Switch to sdist_upip. Feb 2, 2018
types types: Add setup metadata. Apr 12, 2014
typing all: setup.py: Switch to sdist_upip. Feb 2, 2018
uaiohttpclient all: setup.py: Switch to sdist_upip. Feb 2, 2018
uasyncio.core uasyncio.core: Release 2.0. May 11, 2018
uasyncio.queues all: setup.py: Switch to sdist_upip. Feb 2, 2018
uasyncio.synchro all: setup.py: Switch to sdist_upip. Feb 2, 2018
uasyncio.udp uasyncio.udp: Release 0.1.1. May 11, 2018
uasyncio.websocket.server uasyncio.websocket.server: Release 0.1. Feb 2, 2018
uasyncio uasyncio: Release 2.0. May 11, 2018
ucontextlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
ucurses all: setup.py: Switch to sdist_upip. Feb 2, 2018
udnspkt all: setup.py: Switch to sdist_upip. Feb 2, 2018
umqtt.robust all: setup.py: Switch to sdist_upip. Feb 2, 2018
umqtt.simple all: setup.py: Switch to sdist_upip. Feb 2, 2018
unicodedata all: setup.py: Switch to sdist_upip. Feb 2, 2018
unittest unittest: Release 0.3.2. May 11, 2018
upip upip: Release 1.2.4. Apr 23, 2018
upysh all: setup.py: Switch to sdist_upip. Feb 2, 2018
urequests all: setup.py: Switch to sdist_upip. Feb 2, 2018
urllib.parse all: setup.py: Switch to sdist_upip. Feb 2, 2018
urllib.urequest all: setup.py: Switch to sdist_upip. Feb 2, 2018
urllib urllib: Add dummy module. May 8, 2014
utarfile all: setup.py: Switch to sdist_upip. Feb 2, 2018
uu all: setup.py: Switch to sdist_upip. Feb 2, 2018
uuid all: setup.py: Switch to sdist_upip. Feb 2, 2018
venv all: setup.py: Switch to sdist_upip. Feb 2, 2018
warnings all: setup.py: Switch to sdist_upip. Feb 2, 2018
weakref all: setup.py: Switch to sdist_upip. Feb 2, 2018
xmltok all: setup.py: Switch to sdist_upip. Feb 2, 2018
zipfile all: setup.py: Switch to sdist_upip. Feb 2, 2018
zlib all: setup.py: Switch to sdist_upip. Feb 2, 2018
.gitignore .gitignore: Ignore local development files. May 31, 2014
CONTRIBUTING.md CONTRIBUTING.md: Add file with a link to Contributor Guidelines. May 3, 2015
LICENSE LICENSE: Add concatenation of licensing terms used. Aug 18, 2014
Makefile Makefile install: Add --no-run-if-empty to xargs. May 11, 2014
README.md README: Update links related to new PyPI URL. Apr 23, 2018
make_metadata.py make_metadata: Switch to use sdist_upip. Feb 2, 2018
optimize_upip.py optimize_upip.py: Rework inclusion/exclusion logic. May 5, 2017
sdist_upip.py sdist_upip: Don't treat files at the toplevel dir as resources. Dec 14, 2017

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: https://pypi.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.

Links

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: