Release v0.1.1 (What’s new?).
Welcome to enum_mate Documentation¶
enum_mate is a Python library that supercharges standard enums by providing explicit, intuitive APIs for validation, retrieval, and type conversion. It introduces BetterIntEnum and BetterStrEnum classes that seamlessly extend Python’s built-in enum functionality with comprehensive methods like get_by_name(), get_by_value(), is_valid_value(), ensure_int(), and ensure_str(). These enhanced enums make input validation, error handling, and enum manipulation more robust and developer-friendly. For a complete guide with detailed usage examples and advanced techniques, visit the comprehensive documentation.
Install¶
enum_mate is released on PyPI, so all you need is to:
$ pip install enum-mate
To upgrade to latest version:
$ pip install --upgrade enum-mate