$npx skillfedfor your agent

backports.strenum

Base class for creating enumerated constants that are also subclasses of str

With conditionsPyPI Software DevelopmentReleased Dec 20238.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — backports_strenum-1.3.1-py3-none-any.whl
v1.3.1 · released 2023-12-09 · Python >=3.8.6,<3.11

Yes, if you need StrEnum on Python 3.8–3.10 and can configure it as a conditional dependency (install only on <3.11). The package is minimal, has no external dependencies, carries no known vulnerabilities, and uses a permissive MIT license. Dormant maintenance is acceptable because it is a static backport of a standard library feature. Not worth installing on Python 3.11+, where the standard library StrEnum should be used directly.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Package only installs on Python >=3.8.6 and <3.11; on Python 3.11+ the standard library StrEnum should be used instead.
  • Low install friction with no runtime dependencies.
  • Maintenance is dormant—last release was 2023-12-09 and the repository shows no recent activity—but the package is intentionally minimal and unlikely to require updates unless Python's enum behavior changes.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe to include in any project type.

last release 2023-12-09 (979 days) · last repo commit 2024-07-24 · 8 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,402,027 downloads/mo, #1,626 on PyPI

Verify before relying

pip install backports.strenum

from backports.strenum import StrEnum

class Color(StrEnum):
    RED = "red"
    BLUE = "blue"

print(Color.RED == "red")  # True
  • Whether the package's behavior fully matches Python 3.11's StrEnum in all edge cases, particularly around container operations that change in Python 3.12.
  • Whether conditional dependency configuration is documented for common package managers.
  • Full compatibility with all string operations and edge cases described in Python 3.11 enum documentation.
Same gist for agents: .md · .json

What it is and what it does

backports.strenum is a direct copy of Python 3.11's StrEnum class, ported to run on Python 3.8.6 through 3.10. It lets you create enumeration classes whose members are both enum constants and string values, so they can be used interchangeably with strings in most contexts. Members support string operations like upper() and lower(), and equality checks work naturally (e.g., Color.RED == "red" returns True).

The package is designed as a conditional dependency: code should import from the standard library on Python 3.11+, and fall back to backports.strenum only on earlier versions. It has no runtime dependencies and installs cleanly. Maintenance is dormant but intentional—the package is a static backport unlikely to need updates unless Python's enum semantics shift significantly.

Use it for

  • Define string-based enums in libraries that must support Python 3.8–3.10 while using native StrEnum on 3.11+.
  • Replace hardcoded string constants with type-safe enum members that retain string compatibility.
  • Build configuration or status classes where members need to serialize as strings and be usable in string comparisons.
  • Migrate legacy code from plain string constants to enums without breaking string-based APIs.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need StrEnum on Python 3.8–3.10 and can configure it as a conditional dependency (install only on <3.11).

The package is minimal, has no external dependencies, carries no known vulnerabilities, and uses a permissive MIT license. Dormant maintenance is acceptable because it is a static backport of a standard library feature. Not worth installing on Python 3.11+, where the standard library StrEnum should be used directly.

Install

backports-strenum on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-12-09 and the repository shows no recent activity—but the package is intentionally minimal and unlikely to require updates unless Python's enum behavior changes.

Package only installs on Python >=3.8.6 and <3.11; on Python 3.11+ the standard library StrEnum should be used instead.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe to include in any project type.

Quickstart

pip install backports.strenum

from backports.strenum import StrEnum

class Color(StrEnum):
    RED = "red"
    BLUE = "blue"

print(Color.RED == "red")  # True

Verify before relying

  • Whether the package's behavior fully matches Python 3.11's StrEnum in all edge cases, particularly around container operations that change in Python 3.12.
  • Whether conditional dependency configuration is documented for common package managers.
  • Full compatibility with all string operations and edge cases described in Python 3.11 enum documentation.

Package facts

LicenseMIT permissive
Python supportCapped below the current Python release >=3.8.6,<3.11
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 979 days since the last release
Last repo commit
First released
Downloads8,402,027 / month, #1,626 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.9

Evidence: backports_strenum-1.3.1-py3-none-any.whl

Tags

Capabilities
string enum backportstrenum python 3.8enum string subclassbackport python 3.11 enumconditional enum dependencystring enumeration class
Topics
backportenumconditional-dependency
PyPI keywords
backportsenumstrenum

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 › “string enum backport”

  • backports.strenumProvides StrEnum, a string-based enumeration class from Python 3.11,…
  • enum34Provides enumeration support for older Python versions by backporting…
  • enum-compatConditionally installs enum34 on Python versions older than 3.4; on…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also StrEnum · enum34 · matrix-enum · enum-tools · aenum · enum-compat · pysubtypes · django-enum · constantly · exitstatus