{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/15"}],"enrichment":{"capability":"Adds comparison operators to Python enums so they can be sorted and compared using standard ordering syntax, with two strategies: ordering by definition sequence or by member values.","skillfed_tags":["enum-utilities","ordering"],"use_cases":["Implement state machines where you need to check if one state is 'before' or 'after' another in a defined sequence.","Sort priority or severity enums (e.g., log levels) by their numeric values without manual conversion.","Build workflow systems that compare enum states to determine valid transitions or precedence.","Create ordered status enums for database records or API responses that need to be ranked or filtered."],"what_it_does":"ordered_enum is a minimal library that makes Python enum members comparable and sortable by implementing total ordering. It provides two base classes: OrderedEnum, which orders members by their definition sequence in the class body, and ValueOrderedEnum, which orders members by their assigned values. The library requires Python 3.9 or newer and has no external dependencies, making it a lightweight addition to projects that need to sort or compare enum states.\n\nThe typical use case is state machines or priority systems where you want to compare enum members directly (e.g., State.Running < State.Waiting) or sort collections of them. OrderedEnum is more flexible since it doesn't require unique values; ValueOrderedEnum enforces uniqueness but orders by the numeric or comparable value you assign to each member.","worth_installing":"Yes, if you need enum comparison. The package is lightweight, actively maintained, has no dependencies, and solves a real gap in Python's standard enum module. The only caveat is the unclear license status\u2014verify that it's compatible with your project's requirements before committing to it."},"id":"ordered-enum","links":{"html":"https://skillfed.io/packages/ordered-enum","md":"https://skillfed.io/packages/ordered-enum.md","pypi":"https://pypi.org/project/ordered-enum/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-06-23","license_spdx":null,"license_treatment":"unclear","name":"ordered-enum","python_support":"supports_current","summary":"A small library for adding total orderings to enums"},"popularity":{"monthly_downloads":152094,"position":10911,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.0.10"}
