morphys
Smart conversions between unicode and bytes types for common cases
Decision gist · record as of 2026-08-14
No. The package is abandoned (last update 2017-01-06) and designed primarily for Python 2. While it has no known vulnerabilities and installs easily, modern Python 3 projects have no practical need for this library. Only consider it for maintaining legacy Python 2 codebases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is frictionless with no runtime dependencies.
- However, the package has been abandoned since its single release with no updates since 2017-01-06, making it unsuitable for active projects.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, suitable for both open-source and proprietary projects.
last release 2017-01-10 (3503 days) · last repo commit 2017-01-06 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 196,578 downloads/mo, #9,779 on PyPI
Alternatives
Verify before relying
pip install morphys
from morphys import ensure_bytes, ensure_unicode
result = ensure_unicode(b'hello')
result = ensure_bytes('hello')- Whether ensure_bytes and ensure_unicode handle all edge cases with non-ASCII content reliably
- Whether StrMorpher's lazy conversion approach works correctly across all contexts
- Current compatibility with modern Python 3 versions beyond the unspecified support claim
What it is and what it does
Morphys is a lightweight utility library for handling the inconsistency between unicode and bytes types in Python 2, where non-ASCII characters can cause unexpected errors. It provides two main conversion functions—ensure_bytes() and ensure_unicode()—that intelligently convert between types only when necessary, and a StrMorpher class that wraps a string to behave as either type on demand. The library also supports custom encodings and defaults to utf-8.
While the package remains compatible with Python 3, it has received no maintenance since 2017-01-10 and was designed primarily for Python 2's unicode/bytes complexity, making it largely obsolete for new projects.
Use it for
- Normalize inconsistent string types from libraries that return either bytes or unicode unpredictably
- Handle legacy codebases that mix unicode and bytes strings without explicit type checking
- Wrap strings in StrMorpher when code needs to accept both bytes and unicode interchangeably
- Ensure consistent string type handling before passing data to functions with strict type requirements
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last update 2017-01-06) and designed primarily for Python 2. While it has no known vulnerabilities and installs easily, modern Python 3 projects have no practical need for this library. Only consider it for maintaining legacy Python 2 codebases.
Install
morphys on PyPI
Before you install
Installation is frictionless with no runtime dependencies. However, the package has been abandoned since its single release with no updates since 2017-01-06, making it unsuitable for active projects.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, suitable for both open-source and proprietary projects.
Quickstart
pip install morphys
from morphys import ensure_bytes, ensure_unicode
result = ensure_unicode(b'hello')
result = ensure_bytes('hello')
Verify before relying
- Whether ensure_bytes and ensure_unicode handle all edge cases with non-ASCII content reliably
- Whether StrMorpher's lazy conversion approach works correctly across all contexts
- Current compatibility with modern Python 3 versions beyond the unspecified support claim
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,503 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 196,578 / month, #9,779 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Utilities |
Evidence: morphys-1.0-py2.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 › “unicode bytes conversion”
- morphysMorphys provides utility functions to convert between unicode and…
- mbstrdecoderDecodes multi-byte character strings by detecting their encoding and…
- python-bidiConverts bidirectional text (mixed left-to-right and right-to-left…
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 mbstrdecoder · anyascii · ftfy · Unidecode · latexcodec · binapy · unicodecsv · confusables · dicttoxml