skillfed

StrEnum

An Enum that inherits from str.

strenum Permissive license DORMANT 123 v0.4.15 released

Install

strenum on PyPI

pip

pip install strenum

uv

uv add strenum

poetry

poetry add strenum

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,141 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: StrEnum-0.4.15-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About StrEnum

from the package's own PyPI description — quoted content, verbatim

StrEnum

Build Status (image)

StrEnum is a Python enum.Enum that inherits from str to complement enum.IntEnum in the standard library. Supports python 3.7+.

Installation

You can use pip to install.

pip install StrEnum

Usage

from enum import auto
from strenum import StrEnum


class HttpMethod(StrEnum):
    GET = auto()
    HEAD = auto()
    POST = auto()
    PUT = auto()
    DELETE = auto()
    CONNECT = auto()
    OPTIONS = auto()
    TRACE = auto()
    PATCH = auto()


assert HttpMethod.GET == "GET"

# You can use StrEnum values just like strings:

import urllib.request

req = urllib.request.Request('https://www.python.org/', method=HttpMethod.HEAD)
with urllib.request.urlopen(req) as response:
    html = response.read()

assert len(html) == 0  # HEAD requests do not (usually) include a body

There are classes whose auto() value folds each member name to upper or lower case:

```python from enum import auto from strenum import LowercaseStrEnum, UppercaseStrEnum

class...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

StrEnum provides an Enum subclass that inherits from str, allowing enum members to be used directly as strings with automatic case conversion options (uppercase, lowercase, camelCase, snake_case, kebab-case, PascalCase, MACRO_CASE) via auto().

Installation is straightforward with no runtime dependencies and a pure-Python wheel distribution. However, the package is dormant—last released 1141 days ago (2023-06-29)—so it receives no active maintenance despite being marked Production/Stable.

Licensed under MIT (permissive), so you may use, modify, and distribute StrEnum freely in commercial and private projects with minimal restrictions.

Usage

pip install StrEnum

from strenum import StrEnum
from enum import auto

class HttpMethod(StrEnum):
    GET = auto()
    POST = auto()

assert HttpMethod.GET == "GET"
print(HttpMethod.GET)  # prints: GET

Python 3.7 or later is required; the package does not declare a minimum Python version in its metadata, but the description states support for Python 3.7+.

Verdict: StrEnum is a stable, dependency-free utility for creating string-based enums with optional automatic case conversion. It fills a real gap for Python < 3.11 (where enum.StrEnum was added to the standard library), but its dormant maintenance status and lack of recent updates mean it may not receive bug fixes or compatibility patches for newer Python versions. Suitable for projects that need string enums and can tolerate no active development.

Needs verification

  • Whether StrEnum 0.4.15 is fully compatible with Python 3.12 despite being last released in June 2023
  • How StrEnum's behavior differs from the standard library's enum.StrEnum (Python 3.11+) and whether migration is straightforward
string enum pythonenum inherits from strauto case conversion enumsnake case enumcamel case enum membershttp method enumstring based enum

Similar packages