enum-mate 0.1.1
A lightweight Python library that enhances enum handling with explicit validation, retrieval, and type-conversion methods for safer and more intuitive enum usage.
License: MIT
Requires Python: <4.0,>=3.9


.. image:: https://readthedocs.org/projects/enum-mate/badge/?version=latest
    :target: https://enum-mate.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/enum_mate-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/enum_mate-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/enum_mate-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/enum_mate-project

.. image:: https://img.shields.io/pypi/v/enum-mate.svg
    :target: https://pypi.python.org/pypi/enum-mate

.. image:: https://img.shields.io/pypi/l/enum-mate.svg
    :target: https://pypi.python.org/pypi/enum-mate

.. image:: https://img.shields.io/pypi/pyversions/enum-mate.svg
    :target: https://pypi.python.org/pypi/enum-mate

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/enum_mate-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/enum_mate-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://enum-mate.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/enum_mate-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/enum_mate-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/enum_mate-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/enum-mate#files


Welcome to ``enum_mate`` Documentation
==============================================================================
.. image:: https://enum-mate.readthedocs.io/en/latest/_static/enum_mate-logo.png
    :target: https://enum-mate.readthedocs.io/en/latest/

``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 <https://enum-mate.readthedocs.io/en/latest/>`_.


.. _install:

Install
------------------------------------------------------------------------------

``enum_mate`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install enum-mate

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade enum-mate