{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/2"}],"enrichment":{"capability":"Provides StrEnum, a string-based enumeration class from Python 3.11, for use on Python 3.8.6 through 3.10, allowing enum members to behave as both strings and enumeration constants.","skillfed_tags":["backport","enum","conditional-dependency"],"use_cases":["Define string-based enums in libraries that must support Python 3.8\u20133.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."],"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).\n\nThe 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\u2014the package is a static backport unlikely to need updates unless Python's enum semantics shift significantly.","worth_installing":"Yes, if you need StrEnum on Python 3.8\u20133.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."},"id":"backports-strenum","links":{"html":"https://skillfed.io/packages/backports-strenum","md":"https://skillfed.io/packages/backports-strenum.md","pypi":"https://pypi.org/project/backports-strenum/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-12-09","license_spdx":null,"license_treatment":"permissive","name":"backports.strenum","python_support":"capped_below_current","summary":"Base class for creating enumerated constants that are also subclasses of str"},"popularity":{"monthly_downloads":8402027,"position":1626,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.3.1"}
