esp-pylib
Python library for logging, utils and constants for Espressif Systems' Python projects
What it is and what it does
esp-pylib is a shared utility library for Espressif's Python projects, bundling logging, error handling, configuration file parsing, and optional integrations for serial ports and IDE communication. The core logging system provides a Rich-based singleton with verbosity control, styled output (note, hint, warning, error), progress bars, and live counters—all designed to keep stdout machine-clean while routing errors to stderr. It also includes exception types (FatalError and subclasses), ROM ELF path resolution for debugging tools, and Click parameter types for CLI development.
The library is modular: the base install (just rich as a dependency) covers logging and configuration; optional extras pull in pyserial for port discovery and DTR/RTS reset primitives, websockets for IDE integration, or click and rich-click for CLI helpers. It's designed for Espressif's own tools but is generally useful for any Python project targeting embedded systems that needs consistent logging and error handling across multiple tools.
Use it for:
- Build a CLI tool for embedded development that logs with consistent styling and verbosity control across multiple subcommands.
- Discover and filter serial ports by VID/PID to auto-detect connected boards during device flashing or monitoring.
- Send structured log messages and exceptions to VS Code or other IDEs via WebSocket for real-time feedback during development.
- Parse per-tool INI configuration files from standard OS locations (home, user config dir, cwd) without duplicating config logic.
- Perform DTR/RTS reset sequences on serial ports to enter bootloader mode, with hardware flow control detection for different adapters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides shared logging, error handling, configuration management, and serial/IDE integration utilities for Espressif Systems' Python projects.
Yes. The package is actively maintained, has no known vulnerabilities, and provides genuine value for Espressif tool developers and anyone building embedded systems CLIs in Python. The modular design lets you use only what you need (base logging, serial helpers, or CLI utilities). Low install friction and broad Python version support make it a safe dependency.
Install
esp-pylib on PyPI
pip
pip install esp-pylibuv
uv add esp-pylibpoetry
poetry add esp-pylibInstalling esp-pylib
Before you install
Active maintenance with a recent release (2 days old). Low install friction: pure wheel distribution with a single runtime dependency (rich). Supports Python 3.7 through 3.14, though IDE features require Python 3.8+.
License in practice
Apache-2.0 is permissive; you can use this in commercial and proprietary projects with minimal restrictions, provided you include a copy of the license and note any modifications.
Quickstart
pip install esp-pylib
from esp_pylib.logger import log
log.note('Informational message')
log.warn('Warning message')
log.err('Error message')
IDE WebSocket features (esp-pylib[ide]) require Python 3.8+; on Python 3.7 they become no-ops or raise FatalError.
Verify before relying
- Whether serial port discovery (esp-pylib[serial]) works reliably across all supported platforms without additional system dependencies.
- Performance characteristics when handling large numbers of serial ports or high-frequency logging in production tools.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — rich |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 621,971/month — #5,712 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: esp_pylib-1.1.3-py3-none-any.whl
Keywords: python, espressif
Tags
More Embedded Systems packages
Provides Python abstractions and utilities for…
copyleft · top 5,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
crccheckCalculates CRC and checksum values from binary…
permissive · top 5,000 on PyPI
esptoolesptool is a serial utility for flashing,…
copyleft · top 5,000 on PyPI
esp-idf-kconfigProvides kconfig language support and IDE…
permissive · top 5,000 on PyPI
pyocdpyOCD is a Python-based debugger and programmer…
permissive · top 5,000 on PyPI
esp-idf-monitorProvides serial communication monitoring and…
permissive · top 15,000 on PyPI
pytest-embedded-serial-espA pytest plugin that provides fixtures and…
permissive · top 15,000 on PyPI
esp-coredumpRetrieves and analyzes core dumps from ESP32…
permissive · top 5,000 on PyPI
python-escposPython library to send text, images, barcodes,…
permissive · top 15,000 on PyPI
bottle-websocketAdds WebSocket support to the Bottle web…
permissive · top 15,000 on PyPI
httpx-wsAdds WebSocket support to HTTPX, enabling sync…
permissive · top 5,000 on PyPI
websocketswebsockets is a library for building WebSocket…
permissive · top 100 on PyPI
pyserial-asyncio-fastProvides async I/O support for serial port…
permissive · top 15,000 on PyPI