mailbits
Assorted e-mail utility functions
Decision gist · record as of 2026-08-14
Yes. mailbits is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real friction point in the standard library's email API. Install it if you work with email messages and need cleaner introspection or conversion utilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or higher
- Low install friction with a single lightweight dependency.
- Actively maintained with recent commits; requires Python 3.10 or higher.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects.
last release 2025-11-29 (258 days) · last repo commit 2026-07-20 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 334,729 downloads/mo, #7,484 on PyPI
Alternatives
Verify before relying
pip install mailbits
from mailbits import ContentType, email2dict
ct = ContentType.parse("text/plain; charset=utf-8")
print(ct.maintype, ct.subtype)
msg_dict = email2dict(msg)- Whether the package handles all RFC 5322 edge cases or has known parsing limitations
- Performance characteristics when processing large or deeply nested multipart messages
- Whether attrs is required at runtime or only for development
What it is and what it does
mailbits is a small utility library that wraps Python's standard email module to make working with Message, EmailMessage, Address, and Group objects simpler and more inspectable. It provides functions to parse Content-Type headers into structured objects, convert email messages into plain Python dicts for easier inspection and comparison, extract recipient addresses, and convert between the older Message class and newer EmailMessage format.
The main use case is when you need to examine or manipulate email messages programmatically but find the standard library's API cumbersome—for instance, when comparing two messages for equality, pretty-printing message structure, or extracting specific address fields. The dict conversion handles nested multipart messages, decodes encoded text and bytes, and provides special representations for headers like From, To, and Content-Type.
Use it for
- Convert email Message objects to dicts for easier testing and comparison in unit tests
- Parse and inspect Content-Type headers to extract media type and parameters
- Extract and format recipient email addresses from EmailMessage objects
- Convert legacy Message instances to the newer EmailMessage format
- Pretty-print or log the structure of a multipart email for debugging
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
mailbits is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real friction point in the standard library's email API. Install it if you work with email messages and need cleaner introspection or conversion utilities.
Install
mailbits on PyPI
Before you install
Low install friction with a single lightweight dependency. Actively maintained with recent commits; requires Python 3.10 or higher.
Requires Python 3.10 or higher
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, suitable for both open-source and commercial projects.
Quickstart
pip install mailbits
from mailbits import ContentType, email2dict
ct = ContentType.parse("text/plain; charset=utf-8")
print(ct.maintype, ct.subtype)
msg_dict = email2dict(msg)
Verify before relying
- Whether the package handles all RFC 5322 edge cases or has known parsing limitations
- Performance characteristics when processing large or deeply nested multipart messages
- Whether attrs is required at runtime or only for development
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageattrs |
| Maintenance | Actively maintained 258 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 334,729 / month, #7,484 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Communications :: EmailTopic :: UtilitiesTyping :: Typed |
Evidence: mailbits-0.2.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “email message parsing utilities”
- mailbitsProvides utilities for parsing, converting, and inspecting email…
- eml-parserParses EML (email) files and extracts structured information…
- quotequailIdentifies and separates quoted text from original content in plain…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also mail-parser · email-validator · imap-tools · quotequail · flufl.bounce · pyap · pyap2 · postmarker · django-templated-email · iptools