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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cca0cb89471db8f22dfcd1740481fe6848aecfc2188d5fc0e25fbfa159454713
|
|
| MD5 |
569a91231d82461124d6ecc37ff42f92
|
|
| BLAKE2b-256 |
e27d18d25e081ada0bbef21fd492f63be48724c103adbfc54331501504c88eff
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8453abda2cbd0358c187532ebfde10dd3ad8b52378a4e6993bcb80fe3a639f89
|
|
| MD5 |
ffc670f3f8e7ef292d786254fad80372
|
|
| BLAKE2b-256 |
7270bae76748971c2f583654667be3f76da8352438a4d887b7a543a399bee137
|