Skip to main content

A lightweight Python library that enhances enum handling with explicit validation, retrieval, and type-conversion methods for safer and more intuitive enum usage.

Project description

Documentation Status https://github.com/MacHu-GWU/enum_mate-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/enum_mate-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/enum-mate.svg https://img.shields.io/pypi/l/enum-mate.svg https://img.shields.io/pypi/pyversions/enum-mate.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to enum_mate Documentation

https://enum-mate.readthedocs.io/en/latest/_static/enum_mate-logo.png

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enum_mate-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enum_mate-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file enum_mate-0.1.1.tar.gz.

File metadata

  • Download URL: enum_mate-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for enum_mate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cca0cb89471db8f22dfcd1740481fe6848aecfc2188d5fc0e25fbfa159454713
MD5 569a91231d82461124d6ecc37ff42f92
BLAKE2b-256 e27d18d25e081ada0bbef21fd492f63be48724c103adbfc54331501504c88eff

See more details on using hashes here.

File details

Details for the file enum_mate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: enum_mate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for enum_mate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8453abda2cbd0358c187532ebfde10dd3ad8b52378a4e6993bcb80fe3a639f89
MD5 ffc670f3f8e7ef292d786254fad80372
BLAKE2b-256 7270bae76748971c2f583654667be3f76da8352438a4d887b7a543a399bee137

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page