-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Standard Library Coverage
Matt Trentini edited this page Aug 5, 2024
·
12 revisions
| Library | Description | MicroPython Status | Notes |
|---|---|---|---|
| future | Future statement definitions | ✅ | micropython-lib |
| main | The environment where the top-level script is run. | ✅ | |
| _thread | Low-level threading API. | ✅ | See Threads for more info. |
| abc | Abstract base classes according to :pep:3119. |
❌ | Placeholder in micropython-lib |
| argparse | Command-line option and argument parsing library. | ✅ | micropython-lib |
| array | Space efficient arrays of uniformly typed numeric values. | ✅ | built-in |
| ast | Abstract Syntax Tree classes and manipulation. | ❌ | Requires _ast to be implemented in core MicroPython. |
| asyncio | Asynchronous I/O. | ✅ | built-in |
| atexit | Register and execute cleanup functions. | ❌ |
atexit module itself is not implemented in MicroPython, but the atexit.register() functionality is largely implemented via sys.atexit()
|
| base64 | RFC 3548: Base16, Base32, Base64 Data Encodings; Base85 and Ascii85 | ✅ | micropython-lib |
| bdb | Debugger framework. | ❌ | |
| binascii | Tools for converting between binary and various ASCII-encoded binary representations. | ✅ | built-in and micropython-lib |
| binhex | Encode and decode files in binhex4 format. | ❌ | Deprecated since CPython 3.9 |
| bisect | Array bisection algorithms for binary searching. | ✅ | micropython-lib |
| builtins | The module that provides the built-in namespace. | ✅ | built-in |
| bz2 | Interfaces for bzip2 compression and decompression. | ❌ | |
| calendar | Functions for working with calendars, including some emulation of the Unix cal program. | ❌ | See #521 |
| cmath | Mathematical functions for complex numbers. | ✅ | built-in |
| cmd | Build line-oriented command interpreters. | ✅ | micropython-lib |
| code | Facilities to implement read-eval-print loops. | ❌ | |
| codecs | Encode and decode data and streams. | ❌ | |
| codeop | Compile (possibly incomplete) Python code. | ❌ | |
| collections | Container datatypes | 🟡 | See Collections module for more info. |
| collections.abc | Abstract base classes for containers | ❌ | |
| colorsys | Conversion functions between RGB and other color systems. | 🟡 | Implementation proposed in Micropython Lib #452 |
| compileall | Tools for byte-compiling all Python source files in a directory tree. | ❌ | |
| concurrent | ? | ||
| concurrent.futures | Execute computations concurrently using threads or processes. | ? | |
| configparser | Configuration file parser. | ? | |
| contextlib | Utilities for with-statement contexts. | ✅ | micropython-lib |
| contextvars | Context Variables | ? | |
| copy | Shallow and deep copy operations. | ✅ | micropython-lib |
| copyreg | Register pickle support functions. | ? | |
| cProfile | ? | ||
| csv | Write and read tabular data to and from delimited files. | ❌ | CPython splits the implementation into a Python module, csv.py, and a C module, _csv.c. It might be possible to port _csv.c and use csv.py directly. |
| ctypes | A foreign function library for Python. | 🟡 | See uctypes. Different to CPython to reduce memory use. |
| curses | An interface to the curses library, providing portable terminal handling. | ? | |
| curses.ascii | Constants and set-membership functions for ASCII characters. | ✅ | micropython-lib |
| curses.panel | A panel stack extension that adds depth to curses windows. | ? | |
| curses.textpad | Emacs-like input editing in a curses window. | ? | |
| dataclasses | Generate special methods on user-defined classes. | ? | |
| datetime | Basic date and time types. | ✅ | micropython-lib |
| dbm | Interfaces to various Unix "database" formats. | ? | |
| dbm.dumb | Portable implementation of the simple DBM interface. | ? | |
| dbm.gnu | GNU's reinterpretation of dbm. | ? | |
| dbm.ndbm | The standard "database" interface, based on ndbm. | ? | |
| decimal | Implementation of the General Decimal Arithmetic Specification. | 🟡 | See third-part mpy-decimal. |
| difflib | Helpers for computing differences between objects. | ? | |
| dis | Disassembler for Python bytecode. | ? | |
| distutils and submodules | Support for building and installing Python modules into an existing Python installation. | ❌ | |
| doctest | Test pieces of code within docstrings. | ? | |
| Package supporting the parsing, manipulating, and generating email messages. | ? | ||
| email.charset | Character Sets | ✅ | micropython-lib |
| email.contentmanager | Storing and Retrieving Content from MIME Parts | ? | |
| email.encoders | Encoders for email message payloads. | ✅ | micropython-lib |
| email.errors | The exception classes used by the email package. | ✅ | micropython-lib |
| email.generator | Generate flat text email messages from a message structure. | ? | |
| email.header | Representing non-ASCII headers | ✅ | micropython-lib |
| email.headerregistry | Automatic Parsing of headers based on the field name | ? | |
| email.iterators | Iterate over a message object tree. | ? | |
| email.message | The base class representing email messages. | ✅ | micropython-lib |
| email.mime | Build MIME messages. | ? | |
| email.parser | Parse flat text email messages to produce a message object structure. | ✅ | micropython-lib |
| email.policy | Controlling the parsing and generating of messages | ? | |
| email.utils | Miscellaneous email package utilities. | ✅ | micropython-lib |
| encodings | ? | ||
| encodings.idna | Internationalized Domain Names implementation | ? | |
| encodings.mbcs | Windows ANSI codepage | ? | |
| encodings.utf_8_sig | UTF-8 codec with BOM signature | ? | |
| ensurepip | Bootstrapping the "pip" installer into an existing Python installation or virtual environment. | ? | |
| enum | Implementation of an enumeration class. | ❌ | Metaclasses are not yet supported in MicroPython and it's challenging to provide enum support without it. |
| errno | Standard errno system symbols. | ✅ | built-in and micropython-lib |
| faulthandler | Dump the Python traceback. | ? | |
| fcntl | The fcntl() and ioctl() system calls. | ? | |
| filecmp | Compare files efficiently. | ? | |
| fileinput | Loop over standard input or a list of files. | ? | |
| fnmatch | Unix shell style filename pattern matching. | ✅ | micropython-lib |
| formatter | Deprecated: Generic output formatter and device interface. | ? | |
| fractions | Rational numbers. | ? | See WIP micropython-fractions |
| ftplib | FTP protocol client (requires sockets). | ? | |
| functools | Higher-order functions and operations on callable objects. | ✅ | micropython-lib |
| gc | Interface to the cycle-detecting garbage collector. | ✅ | built-in |
| getopt | Portable parser for command line options; support both short and long option names. | ✅ | micropython-lib |
| getpass | Portable reading of passwords and retrieval of the userid. | ? | |
| gettext | Multilingual internationalization services. | ? | |
| glob | Unix shell style pathname pattern expansion. | ✅ | micropython-lib |
| graphlib | Functionality to operate with graph-like structures | ? | |
| grp | The group database (getgrnam() and friends). | ? | |
| gzip | Interfaces for gzip compression and decompression using file objects. | ✅ | micropython-lib |
| hashlib | Secure hash and message digest algorithms. | ✅ | built-in and micropython-lib |
| heapq | Heap queue algorithm (a.k.a. priority queue). | ✅ | built-in and micropython-lib |
| hmac | Keyed-Hashing for Message Authentication (HMAC) implementation | ✅ | micropython-lib |
| html | Helpers for manipulating HTML. | ✅ | micropython-lib |
| html.entities | Definitions of HTML general entities. | ✅ | micropython-lib |
| html.parser | A simple parser that can handle HTML and XHTML. | ✅ | micropython-lib |
| http | HTTP status codes and messages | ? | |
| http.client | HTTP and HTTPS protocol client (requires sockets). | ✅ | micropython-lib |
| http.cookiejar | Classes for automatic handling of HTTP cookies. | ? | |
| http.cookies | Support for HTTP state management (cookies). | ? | |
| http.server | HTTP server and request handlers. | ? | |
| imaplib | IMAP4 protocol client (requires sockets). | ? | |
| imp | Deprecated: Access the implementation of the import statement. | ? | |
| importlib | The implementation of the import machinery. | ? | |
| importlib.abc | Abstract base classes related to import | ? | |
| importlib.machinery | Importers and path hooks | ? | |
| importlib.metadata | The implementation of the importlib metadata. | ? | |
| importlib.resources | Package resource reading, opening, and access | ? | |
| importlib.util | Utility code for importers | ? | |
| inspect | Extract information and source code from live objects. | 🟡 | Some of inspect is available at micropython-lib |
| io | Core tools for working with streams. | ✅ | built-in and micropython-lib |
| ipaddress | IPv4/IPv6 manipulation library. | ? | |
| itertools | Functions creating iterators for efficient looping. | ✅ | micropython-lib |
| json | Encode and decode the JSON format. | ✅ | built-in and micropython-lib |
| json.tool | A command line to validate and pretty-print JSON. | ? | |
| keyword | Test whether a string is a keyword in Python. | ✅ | micropython-lib |
| lib2to3 | The 2to3 library | ? | |
| linecache | Provides random access to individual lines from text files. | ❌ | |
| locale | Internationalization services. | ✅ | micropython-lib |
| logging | Flexible event logging system for applications. | ✅ | micropython-lib |
| logging.config | Configuration of the logging module. | ? | |
| logging.handlers | Handlers for the logging module. | ? | |
| lzma | A Python wrapper for the liblzma compression library. | ? | |
| mailbox | Manipulate mailboxes in various formats | ? | |
| mailcap | Mailcap file handling. | ? | |
| marshal | Convert Python objects to streams of bytes and back (with different constraints). | ? | |
| math | Mathematical functions (sin() etc.). | ✅ | built-in |
| mimetypes | Mapping of filename extensions to MIME types. | ? | |
| mmap | Interface to memory-mapped files for Unix and Windows. | ? | |
| modulefinder | Find modules used by a script. | ? | |
| msvcrt | Miscellaneous useful routines from the MS VC++ runtime. | ? | |
| multiprocessing | Process-based parallelism. | ? | |
| multiprocessing.connection | API for dealing with sockets. | ? | |
| multiprocessing.dummy | Dumb wrapper around threading. | ? | |
| multiprocessing.managers | Share data between process with shared objects. | ? | |
| multiprocessing.pool | Create pools of processes. | ? | |
| multiprocessing.shared_memory | Provides shared memory for direct access across processes. | ? | |
| multiprocessing.sharedctypes | Allocate ctypes objects from shared memory. | ? | |
| netrc | Loading of .netrc files. | ? | |
| numbers | Numeric abstract base classes (Complex, Real, Integral, etc.). | ? | |
| operator | Functions corresponding to the standard operators. | ✅ | micropython-lib |
| optparse | Deprecated: Command-line option parsing library. | ? | |
| os | Miscellaneous operating system interfaces. | ✅ | built-in and micropython-lib |
| os.path | Operations on pathnames. | ✅ | micropython-lib |
| parser | Access parse trees for Python source code. | ? | |
| pathlib | Object-oriented filesystem paths | ? | |
| pdb | The Python debugger for interactive interpreters. | ? | See WIP micropython-lib PR #499 |
| pickle | Convert Python objects to streams of bytes and back. | ✅ | micropython-lib |
| pickletools | Contains extensive comments about the pickle protocols and pickle-machine opcodes, as well as some useful functions. | ? | |
| pkgutil | Utilities for the import system. | ✅ | micropython-lib |
| platform | Retrieves as much platform identifying data as possible. | ? | |
| plistlib | Generate and parse Apple plist files. | ? | |
| poplib | POP3 protocol client (requires sockets). | ? | |
| posix | The most common POSIX system calls (normally used via module os). | ? | |
| pprint | Data pretty printer. | ✅ | micropython-lib |
| profile | Python source profiler. | ? | |
| pstats | Statistics object for use with the profiler. | ? | |
| pty | Pseudo-Terminal Handling for Linux. | ? | |
| pwd | The password database (getpwnam() and friends). | ? | |
| py_compile | Generate byte-code files from Python source files. | ? | |
| pyclbr | Supports information extraction for a Python module browser. | ? | |
| pydoc | Documentation generator and online help system. | ? | |
| queue | A synchronized queue class. | ? | |
| quopri | Encode and decode files using the MIME quoted-printable encoding. | ✅ | micropython-lib |
| random | Generate pseudo-random numbers with various common distributions. | ✅ | built-in and micropython-lib |
| re | Regular expression operations. | ✅ | built-in |
| readline | GNU readline support for Python. | ? | |
| reprlib | Alternate repr() implementation with size limits. | ? | |
| resource | An interface to provide resource usage information on the current process. | ? | |
| rlcompleter | Python identifier completion, suitable for the GNU readline library. | ? | |
| runpy | Locate and run Python modules without importing them first. | ? | |
| sched | General purpose event scheduler. | ? | |
| secrets | Generate secure random numbers for managing secrets. | ? | |
| select | Wait for I/O completion on multiple streams. | ✅ | built-in |
| selectors | High-level I/O multiplexing. | ? | |
| shelve | Python object persistence. | ? | |
| shlex | Simple lexical analysis for Unix shell-like languages. | ? | |
| shutil | High-level file operations, including copying. | ✅ | micropython-lib |
| signal | Set handlers for asynchronous events. | ? | |
| site | Module responsible for site-specific configuration. | ? | |
| smtplib | SMTP protocol client (requires sockets). | ? | |
| socket | Low-level networking interface. | ✅ | built-in and micropython-lib |
| socketserver | A framework for network servers. | ? | |
| sqlite3 | A DB-API 2.0 implementation using SQLite 3.x. | ? | |
| ssl | TLS/SSL wrapper for socket objects | ✅ | built-in and micropython-lib |
| stat | Utilities for interpreting the results of os.stat(), os.lstat() and os.fstat(). | ✅ | micropython-lib |
| statistics | Mathematical statistics functions | ? | |
| string | Common string operations. | ✅ | micropython-lib |
| stringprep | String preparation, as per RFC 3453 | ? | |
| struct | Interpret bytes as packed binary data. | ✅ | built-in and micropython-lib |
| subprocess | Subprocess management. | ? | |
| symbol | Constants representing internal nodes of the parse tree. | ? | |
| symtable | Interface to the compiler's internal symbol tables. | ? | |
| sys | Access system-specific parameters and functions. | ✅ | built-in |
| sysconfig | Python's configuration information | ? | |
| syslog | An interface to the Unix syslog library routines. | ? | |
| tabnanny | Tool for detecting white space related problems in Python source files in a directory tree. | ? | |
| tarfile | Read and write tar-format archive files. | ? | |
| tempfile | Generate temporary files and directories. | ? | |
| termios | POSIX style tty control. | ? | |
| test | Regression tests package containing the testing suite for Python. | ? | |
| test.support | Support for Python's regression test suite. | ? | |
| test.support.bytecode_helper | Support tools for testing correct bytecode generation. | ? | |
| test.support.script_helper | Support for Python's script execution tests. | ? | |
| test.support.socket_helper | Support for socket tests. | ? | |
| textwrap | Text wrapping and filling | ✅ | micropython-lib |
| threading | Thread-based parallelism. | ✅ | micropython-lib |
| time | Time access and conversions. | ✅ | built-in |
| timeit | Measure the execution time of small code snippets. | ✅ | micropython-lib |
| tkinter and submodules | Interface to Tcl/Tk for graphical user interfaces | ❌ | |
| token | Constants representing terminal nodes of the parse tree. | ? | |
| tokenize | Lexical scanner for Python source code. | ❌ | |
| trace | Trace or track Python statement execution. | ? | |
| traceback | Print or retrieve a stack traceback. | ✅ | micropython-lib |
| tracemalloc | Trace memory allocations. | ? | |
| tty | Utility functions that perform common terminal control operations. | ? | |
| turtle | An educational framework for simple graphics applications | ? | |
| turtledemo | A viewer for example turtle scripts | ? | |
| types | Names for built-in types. | 🟡 |
micropython-lib (missing at least MappingProxyType, maybe more) |
| typing | Support for type hints (see :pep:484). |
? | |
| unicodedata | Access the Unicode Database. | ? | |
| unittest | Unit testing framework for Python. | ✅ | micropython-lib |
| unittest.mock | Mock object library. | ? | |
| urllib | ? | ||
| urllib.error | Exception classes raised by urllib.request. | ? | |
| urllib.parse | Parse URLs into or assemble them from components. | ✅ | micropython-lib |
| urllib.request | Extensible library for opening URLs. | ? | |
| urllib.response | Response classes used by urllib. | ? | |
| urllib.robotparser | Load a robots.txt file and answer questions about fetchability of other URLs. | ? | |
| uuid | UUID objects (universally unique identifiers) according to RFC 4122 | ? | |
| venv | Creation of virtual environments. | ? | |
| warnings | Issue warning messages and control their disposition. | ✅ | micropython-lib |
| wave | Provide an interface to the WAV sound format. | ? | |
| weakref | Support for weak references and weak dictionaries. | ? | |
| webbrowser | Easy-to-use controller for Web browsers. | ? | |
| winreg | Routines and objects for manipulating the Windows registry. | ? | |
| winsound | Access to the sound-playing machinery for Windows. | ? | |
| wsgiref | WSGI Utilities and Reference Implementation. | ? | |
| wsgiref.handlers | WSGI server/gateway base classes. | ? | |
| wsgiref.headers | WSGI response header tools. | ? | |
| wsgiref.simple_server | A simple WSGI HTTP server. | ? | |
| wsgiref.util | WSGI environment utilities. | ? | |
| wsgiref.validate | WSGI conformance checker. | ? | |
| xml | Package containing XML processing modules | ? | |
| xml.dom | Document Object Model API for Python. | ? | |
| xml.dom.minidom | Minimal Document Object Model (DOM) implementation. | ? | |
| xml.dom.pulldom | Support for building partial DOM trees from SAX events. | ? | |
| xml.etree.ElementTree | Implementation of the ElementTree API. | ? | |
| xml.parsers.expat | An interface to the Expat non-validating XML parser. | ? | |
| xml.parsers.expat.errors | ? | ||
| xml.parsers.expat.model | ? | ||
| xml.sax | Package containing SAX2 base classes and convenience functions. | ? | |
| xml.sax.handler | Base classes for SAX event handlers. | ? | |
| xml.sax.saxutils | Convenience functions and classes for use with SAX. | ? | |
| xml.sax.xmlreader | Interface which SAX-compliant XML parsers must implement. | ? | |
| xmlrpc | ? | ||
| xmlrpc.client | XML-RPC client access. | ? | |
| xmlrpc.server | Basic XML-RPC server implementations. | ? | |
| zipapp | Manage executable Python zip archives | ? | |
| zipfile | Read and write ZIP-format archive files. | ? | |
| zipimport | Support for importing Python modules from ZIP archives. | ? | |
| zlib | Low-level interface to compression and decompression routines compatible with gzip. | ✅ | built-in |
| zoneinfo | IANA time zone support | ? |