highlander-enum


Namehighlander-enum JSON
Version 0.9.1 PyPI version JSON
download
home_pageNone
SummaryBetter enums including flags with subsets in which there can be only one... set.
upload_time2025-08-08 05:46:51
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.11
licenseNone
keywords enum python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ๐Ÿ—ก๏ธ Highlander Enum

[![Release](https://img.shields.io/github/v/release/florean/highlander-enum)](https://img.shields.io/github/v/release/florean/highlander-enum)
[![Build status](https://img.shields.io/github/actions/workflow/status/florean/highlander-enum/main.yml?branch=main)](https://github.com/florean/highlander-enum/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/florean/highlander-enum/branch/main/graph/badge.svg)](https://codecov.io/gh/florean/highlander-enum)
[![Commit activity](https://img.shields.io/github/commit-activity/m/florean/highlander-enum)](https://img.shields.io/github/commit-activity/m/florean/highlander-enum)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/florean/django-front-runner/blob/main/LICENSE)

> *"There can be only one!"* - A Python library for mutually exclusive flag enums with smart conflict resolution.

**Highlander Enum** provides `ExFlag` and `OptionsFlag` - specialized variations of Python's `IntFlag` enum designed for scenarios where certain flags must be mutually exclusive. Think command-line options where `--verbose` and `--quiet` can't both be active, or configuration settings where only one mode can be selected at a time.

## โœจ Key Features

- ๐Ÿšซ **Mutually Exclusive Flags**: Define groups where only one flag can be active
- ๐Ÿ”€ **Smart Conflict Resolution**: Choose how conflicts are handled (RHS wins, LHS wins, or strict mode)
- ๐Ÿƒ **Performance Optimized**: Uses bitmasks for fast conflict detection during bitwise operations
- ๐Ÿ“‹ **Command-Line Ready**: `OptionsFlag` includes aliases and help text for CLI tools
- ๐ŸŽฏ **Type Safe**: Full type hints and comprehensive test coverage (100%)
- ๐Ÿ **Modern Python**: Supports Python 3.11, 3.12, and 3.13

## ๐Ÿš€ Quick Start

### Installation

```bash
pip install highlander-enum
```

### Basic Usage

```python
from highlander import ExFlag

class NetworkMode(ExFlag):
    # Basic flags that can be combined
    IPV4 = 1
    IPV6 = 2
    ENCRYPTION = 4
    COMPRESSION = 8

    # Mutually exclusive verbosity levels
    QUIET = 16
    VERBOSE = 32
    DEBUG = 64, (QUIET, VERBOSE)

# RHS (right-hand side) wins by default
mode = NetworkMode.QUIET | NetworkMode.VERBOSE
print(mode)  # NetworkMode.VERBOSE (VERBOSE wins)

# Non-conflicting flags combine normally
mode = NetworkMode.IPV4 | NetworkMode.ENCRYPTION | NetworkMode.VERBOSE
print(mode)  # NetworkMode.ENCRYPTION|IPV4|VERBOSE
```

## ๐ŸŽ›๏ธ Conflict Resolution Strategies

Choose how conflicts should be resolved when mutually exclusive flags are combined:

### RHS (Right-Hand Side) - Default
```python
class LogLevel(ExFlag):  # Default: conflict="rhs"
    ERROR = 1
    WARN = 2
    INFO = 4, (ERROR, WARN)

result = LogLevel.ERROR | LogLevel.INFO
print(result)  # LogLevel.INFO (newer value wins)
```

### LHS (Left-Hand Side)
```python
class LogLevel(ExFlag, conflict="lhs"):
    ERROR = 1
    WARN = 2
    INFO = 4, (ERROR, WARN)

result = LogLevel.ERROR | LogLevel.INFO
print(result)  # LogLevel.ERROR (existing value wins)
```

### Strict Mode
```python
class LogLevel(ExFlag, conflict="strict"):
    ERROR = 1
    WARN = 2
    INFO = 4, (ERROR, WARN)

try:
    result = LogLevel.ERROR | LogLevel.INFO
except ValueError as e:
    print(e)  # LogLevel.INFO conflicts with LogLevel.ERROR
```

## ๐Ÿ–ฅ๏ธ Command-Line Options with OptionsFlag

Perfect for building CLI tools with rich help text and aliases:

```python
from highlander import OptionsFlag

class ServerOptions(OptionsFlag):
    # Format: VALUE, [aliases], "help text", [exclusions]
    VERBOSE = 1, ["v", "verbose"], "Enable verbose logging"
    QUIET = 2, ["q", "quiet"], "Suppress all output"
    DEBUG = 4, ["d", "debug"], "Enable debug mode", (VERBOSE, QUIET)

    # Different tuple formats supported
    DAEMON = 8, "Run as daemon"  # Just help text
    CONFIG = 16, ["c", "config"], "Specify config file"  # No exclusions
    FORCE = 32, "Force operation", (DAEMON,)  # Help + exclusions

# Access help text and aliases
opt = ServerOptions.VERBOSE
print(f"Help: {opt.help}")      # Help: Enable verbose logging
print(f"Aliases: {opt.aliases}")  # Aliases: ['v', 'verbose']

# Smart conflict resolution
flags = ServerOptions.QUIET | ServerOptions.DEBUG
print(flags)  # ServerOptions.DEBUG (DEBUG wins over QUIET)
```

## ๐Ÿ”ง Advanced Usage

### Dynamic Exclusions

Add exclusions at runtime:

```python
class DynamicFlag(ExFlag):
    A = 1
    B = 2
    C = 4

flag_a = DynamicFlag.A
flag_a.add_exclusions(DynamicFlag.B, DynamicFlag.C)

result = DynamicFlag.A | DynamicFlag.B
print(result)  # DynamicFlag.A (conflicts resolved)
```

### Multiple Exclusion Groups

Create complex relationships between different groups of flags:

```python
class UITheme(ExFlag):
    # Color schemes (mutually exclusive)
    DARK = 1
    LIGHT = 2
    HIGH_CONTRAST = 4, (DARK, LIGHT)

    # Size options (separate exclusion group)
    SMALL = 8
    MEDIUM = 16
    LARGE = 32, (SMALL, MEDIUM)

    # Independent options (no conflicts)
    ANIMATIONS = 64
    SOUND_EFFECTS = 128

# Mix and match from different groups
theme = UITheme.DARK | UITheme.LARGE | UITheme.ANIMATIONS
print(theme)  # UITheme.ANIMATIONS|DARK|LARGE

# Conflicts within groups are resolved
theme = UITheme.DARK | UITheme.LIGHT | UITheme.SMALL
print(theme)  # UITheme.LIGHT|SMALL (LIGHT wins over DARK)
```

### Working with Integer Values

```python
# Create flags from integer values with automatic conflict resolution
mixed_flags = NetworkMode(1 | 16 | 32)  # IPV4 + QUIET + VERBOSE
print(mixed_flags)  # NetworkMode.IPV4|QUIET (conflicts resolved)

# Check if flags are set
if NetworkMode.IPV4 in mixed_flags:
    print("IPv4 is enabled")
```

## ๐Ÿ›ก๏ธ Type Safety & IDE Support

Highlander Enum provides full type hints for excellent IDE support:

```python
from highlander import ExFlag

class StatusFlag(ExFlag):
    IDLE = 1
    BUSY = 2, (IDLE,)
    ERROR = 4

def process_status(status: StatusFlag) -> str:
    if status & StatusFlag.ERROR:
        return "Error occurred"
    elif status & StatusFlag.BUSY:
        return "Currently busy"
    else:
        return "Ready"

# IDE will provide autocompletion and type checking
result = process_status(StatusFlag.BUSY | StatusFlag.ERROR)
print(result)  # "Error occurred"
```

## ๐Ÿ“Š Performance

Highlander Enum is designed for performance with bitwise operations:

```python
import timeit
from highlander import ExFlag

class PerfTest(ExFlag):
    A = 1
    B = 2, (A,)
    C = 4
    D = 8

# Fast bitwise operations with conflict resolution
def test_operations():
    return PerfTest.A | PerfTest.B | PerfTest.C

# Benchmark shows minimal overhead compared to standard IntFlag
print(f"Time per operation: {timeit.timeit(test_operations, number=100000):.6f}s")
```

## ๐Ÿงช Real-World Examples

### File Processing Tool

```python
from highlander import OptionsFlag

class FileProcessor(OptionsFlag):
    # Output verbosity (mutually exclusive)
    SILENT = 1, ["s", "silent"], "No output"
    NORMAL = 2, ["n", "normal"], "Normal output"
    VERBOSE = 4, ["v", "verbose"], "Verbose output", (SILENT, NORMAL)

    # Processing modes (mutually exclusive)
    FAST = 8, ["f", "fast"], "Fast processing"
    ACCURATE = 16, ["a", "accurate"], "Accurate processing", (FAST,)

    # Independent options
    BACKUP = 32, ["b", "backup"], "Create backups"
    COMPRESS = 64, ["c", "compress"], "Compress output"

def process_files(options: FileProcessor):
    if options & FileProcessor.VERBOSE:
        print("Verbose mode enabled")
    if options & FileProcessor.BACKUP:
        print("Creating backups")

# Usage
opts = FileProcessor.VERBOSE | FileProcessor.ACCURATE | FileProcessor.BACKUP
process_files(opts)
```

### Game Settings

```python
from highlander import ExFlag

class GraphicsSettings(ExFlag):
    # Quality levels (mutually exclusive)
    LOW = 1
    MEDIUM = 2
    HIGH = 4
    ULTRA = 8, (LOW, MEDIUM, HIGH)

    # Independent features
    VSYNC = 16
    HDR = 32
    ANTIALIASING = 64

class GameConfig:
    def __init__(self):
        self.graphics = GraphicsSettings.MEDIUM | GraphicsSettings.VSYNC

    def upgrade_quality(self):
        # Automatically resolves conflicts
        self.graphics |= GraphicsSettings.HIGH

    def toggle_hdr(self):
        self.graphics ^= GraphicsSettings.HDR

config = GameConfig()
print(config.graphics)  # GraphicsSettings.VSYNC|MEDIUM

config.upgrade_quality()
print(config.graphics)  # GraphicsSettings.VSYNC|HIGH (conflict resolved)
```

## ๐Ÿ—๏ธ Development

### Requirements

- Python 3.11+
- uv (recommended) or pip

### Setup

```bash
git clone https://github.com/florean/highlander-enum.git
cd highlander-enum
make install  # Sets up virtual environment and pre-commit hooks
```

### Testing

```bash
make test          # Run pytest with coverage
make check         # Run all quality checks (linting, type checking, etc.)
tox               # Test across multiple Python versions
```

### Building Documentation

```bash
make docs         # Serve documentation locally
make docs-test    # Test documentation build
```

## ๐Ÿ“ˆ Project Roadmap

### For 1.0
- New conflict resolutions: smallest wins and largest wins
- More robust constraint specification at member definition
- Better CLI integration for OptionsFlag - more helper methods or parser-specific subclasses
- Solidify internal API and naming
- More real-world usage

### Future Enhancements
- Allow inheriting from and extending existing enums

## ๐Ÿค Contributing

Contributions are welcome! This project maintains **100% test coverage** because reliability is paramount. Please:

1. Fork the repository
2. Create a feature branch
3. Add comprehensive tests for new functionality (we can help!)
4. Ensure all tests pass and coverage remains 100%
5. Submit a pull request

For bug reports, please open an [issue](https://github.com/florean/highlander-enum/issues).
For feature requests or discussions about potential enhancements, start a [discussion](https://github.com/florean/highlander-enum/discussions).

## ๐Ÿ“„ License

This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ”— Links

- **Documentation**: [https://florean.github.io/highlander-enum/](https://florean.github.io/highlander-enum/)
- **Repository**: [https://github.com/florean/highlander-enum](https://github.com/florean/highlander-enum)
- **PyPI**: [https://pypi.org/project/highlander-enum/](https://pypi.org/project/highlander-enum/)

---

*"In the end, there can be only one... flag active in each subset of flags, unless you use add_exclusions and only apply it to one side, in which case yoโ€”๐Ÿ—ก๏ธ"*

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "highlander-enum",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "enum, python",
    "author": null,
    "author_email": "Nathan Florea <florean@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3e/9f/55e006ce29c589f10905ca3bfe7c8d7f51d2fc9f9763d1afdea35ea9282d/highlander_enum-0.9.1.tar.gz",
    "platform": null,
    "description": "# \ud83d\udde1\ufe0f Highlander Enum\n\n[![Release](https://img.shields.io/github/v/release/florean/highlander-enum)](https://img.shields.io/github/v/release/florean/highlander-enum)\n[![Build status](https://img.shields.io/github/actions/workflow/status/florean/highlander-enum/main.yml?branch=main)](https://github.com/florean/highlander-enum/actions/workflows/main.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/florean/highlander-enum/branch/main/graph/badge.svg)](https://codecov.io/gh/florean/highlander-enum)\n[![Commit activity](https://img.shields.io/github/commit-activity/m/florean/highlander-enum)](https://img.shields.io/github/commit-activity/m/florean/highlander-enum)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/florean/django-front-runner/blob/main/LICENSE)\n\n> *\"There can be only one!\"* - A Python library for mutually exclusive flag enums with smart conflict resolution.\n\n**Highlander Enum** provides `ExFlag` and `OptionsFlag` - specialized variations of Python's `IntFlag` enum designed for scenarios where certain flags must be mutually exclusive. Think command-line options where `--verbose` and `--quiet` can't both be active, or configuration settings where only one mode can be selected at a time.\n\n## \u2728 Key Features\n\n- \ud83d\udeab **Mutually Exclusive Flags**: Define groups where only one flag can be active\n- \ud83d\udd00 **Smart Conflict Resolution**: Choose how conflicts are handled (RHS wins, LHS wins, or strict mode)\n- \ud83c\udfc3 **Performance Optimized**: Uses bitmasks for fast conflict detection during bitwise operations\n- \ud83d\udccb **Command-Line Ready**: `OptionsFlag` includes aliases and help text for CLI tools\n- \ud83c\udfaf **Type Safe**: Full type hints and comprehensive test coverage (100%)\n- \ud83d\udc0d **Modern Python**: Supports Python 3.11, 3.12, and 3.13\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\npip install highlander-enum\n```\n\n### Basic Usage\n\n```python\nfrom highlander import ExFlag\n\nclass NetworkMode(ExFlag):\n    # Basic flags that can be combined\n    IPV4 = 1\n    IPV6 = 2\n    ENCRYPTION = 4\n    COMPRESSION = 8\n\n    # Mutually exclusive verbosity levels\n    QUIET = 16\n    VERBOSE = 32\n    DEBUG = 64, (QUIET, VERBOSE)\n\n# RHS (right-hand side) wins by default\nmode = NetworkMode.QUIET | NetworkMode.VERBOSE\nprint(mode)  # NetworkMode.VERBOSE (VERBOSE wins)\n\n# Non-conflicting flags combine normally\nmode = NetworkMode.IPV4 | NetworkMode.ENCRYPTION | NetworkMode.VERBOSE\nprint(mode)  # NetworkMode.ENCRYPTION|IPV4|VERBOSE\n```\n\n## \ud83c\udf9b\ufe0f Conflict Resolution Strategies\n\nChoose how conflicts should be resolved when mutually exclusive flags are combined:\n\n### RHS (Right-Hand Side) - Default\n```python\nclass LogLevel(ExFlag):  # Default: conflict=\"rhs\"\n    ERROR = 1\n    WARN = 2\n    INFO = 4, (ERROR, WARN)\n\nresult = LogLevel.ERROR | LogLevel.INFO\nprint(result)  # LogLevel.INFO (newer value wins)\n```\n\n### LHS (Left-Hand Side)\n```python\nclass LogLevel(ExFlag, conflict=\"lhs\"):\n    ERROR = 1\n    WARN = 2\n    INFO = 4, (ERROR, WARN)\n\nresult = LogLevel.ERROR | LogLevel.INFO\nprint(result)  # LogLevel.ERROR (existing value wins)\n```\n\n### Strict Mode\n```python\nclass LogLevel(ExFlag, conflict=\"strict\"):\n    ERROR = 1\n    WARN = 2\n    INFO = 4, (ERROR, WARN)\n\ntry:\n    result = LogLevel.ERROR | LogLevel.INFO\nexcept ValueError as e:\n    print(e)  # LogLevel.INFO conflicts with LogLevel.ERROR\n```\n\n## \ud83d\udda5\ufe0f Command-Line Options with OptionsFlag\n\nPerfect for building CLI tools with rich help text and aliases:\n\n```python\nfrom highlander import OptionsFlag\n\nclass ServerOptions(OptionsFlag):\n    # Format: VALUE, [aliases], \"help text\", [exclusions]\n    VERBOSE = 1, [\"v\", \"verbose\"], \"Enable verbose logging\"\n    QUIET = 2, [\"q\", \"quiet\"], \"Suppress all output\"\n    DEBUG = 4, [\"d\", \"debug\"], \"Enable debug mode\", (VERBOSE, QUIET)\n\n    # Different tuple formats supported\n    DAEMON = 8, \"Run as daemon\"  # Just help text\n    CONFIG = 16, [\"c\", \"config\"], \"Specify config file\"  # No exclusions\n    FORCE = 32, \"Force operation\", (DAEMON,)  # Help + exclusions\n\n# Access help text and aliases\nopt = ServerOptions.VERBOSE\nprint(f\"Help: {opt.help}\")      # Help: Enable verbose logging\nprint(f\"Aliases: {opt.aliases}\")  # Aliases: ['v', 'verbose']\n\n# Smart conflict resolution\nflags = ServerOptions.QUIET | ServerOptions.DEBUG\nprint(flags)  # ServerOptions.DEBUG (DEBUG wins over QUIET)\n```\n\n## \ud83d\udd27 Advanced Usage\n\n### Dynamic Exclusions\n\nAdd exclusions at runtime:\n\n```python\nclass DynamicFlag(ExFlag):\n    A = 1\n    B = 2\n    C = 4\n\nflag_a = DynamicFlag.A\nflag_a.add_exclusions(DynamicFlag.B, DynamicFlag.C)\n\nresult = DynamicFlag.A | DynamicFlag.B\nprint(result)  # DynamicFlag.A (conflicts resolved)\n```\n\n### Multiple Exclusion Groups\n\nCreate complex relationships between different groups of flags:\n\n```python\nclass UITheme(ExFlag):\n    # Color schemes (mutually exclusive)\n    DARK = 1\n    LIGHT = 2\n    HIGH_CONTRAST = 4, (DARK, LIGHT)\n\n    # Size options (separate exclusion group)\n    SMALL = 8\n    MEDIUM = 16\n    LARGE = 32, (SMALL, MEDIUM)\n\n    # Independent options (no conflicts)\n    ANIMATIONS = 64\n    SOUND_EFFECTS = 128\n\n# Mix and match from different groups\ntheme = UITheme.DARK | UITheme.LARGE | UITheme.ANIMATIONS\nprint(theme)  # UITheme.ANIMATIONS|DARK|LARGE\n\n# Conflicts within groups are resolved\ntheme = UITheme.DARK | UITheme.LIGHT | UITheme.SMALL\nprint(theme)  # UITheme.LIGHT|SMALL (LIGHT wins over DARK)\n```\n\n### Working with Integer Values\n\n```python\n# Create flags from integer values with automatic conflict resolution\nmixed_flags = NetworkMode(1 | 16 | 32)  # IPV4 + QUIET + VERBOSE\nprint(mixed_flags)  # NetworkMode.IPV4|QUIET (conflicts resolved)\n\n# Check if flags are set\nif NetworkMode.IPV4 in mixed_flags:\n    print(\"IPv4 is enabled\")\n```\n\n## \ud83d\udee1\ufe0f Type Safety & IDE Support\n\nHighlander Enum provides full type hints for excellent IDE support:\n\n```python\nfrom highlander import ExFlag\n\nclass StatusFlag(ExFlag):\n    IDLE = 1\n    BUSY = 2, (IDLE,)\n    ERROR = 4\n\ndef process_status(status: StatusFlag) -> str:\n    if status & StatusFlag.ERROR:\n        return \"Error occurred\"\n    elif status & StatusFlag.BUSY:\n        return \"Currently busy\"\n    else:\n        return \"Ready\"\n\n# IDE will provide autocompletion and type checking\nresult = process_status(StatusFlag.BUSY | StatusFlag.ERROR)\nprint(result)  # \"Error occurred\"\n```\n\n## \ud83d\udcca Performance\n\nHighlander Enum is designed for performance with bitwise operations:\n\n```python\nimport timeit\nfrom highlander import ExFlag\n\nclass PerfTest(ExFlag):\n    A = 1\n    B = 2, (A,)\n    C = 4\n    D = 8\n\n# Fast bitwise operations with conflict resolution\ndef test_operations():\n    return PerfTest.A | PerfTest.B | PerfTest.C\n\n# Benchmark shows minimal overhead compared to standard IntFlag\nprint(f\"Time per operation: {timeit.timeit(test_operations, number=100000):.6f}s\")\n```\n\n## \ud83e\uddea Real-World Examples\n\n### File Processing Tool\n\n```python\nfrom highlander import OptionsFlag\n\nclass FileProcessor(OptionsFlag):\n    # Output verbosity (mutually exclusive)\n    SILENT = 1, [\"s\", \"silent\"], \"No output\"\n    NORMAL = 2, [\"n\", \"normal\"], \"Normal output\"\n    VERBOSE = 4, [\"v\", \"verbose\"], \"Verbose output\", (SILENT, NORMAL)\n\n    # Processing modes (mutually exclusive)\n    FAST = 8, [\"f\", \"fast\"], \"Fast processing\"\n    ACCURATE = 16, [\"a\", \"accurate\"], \"Accurate processing\", (FAST,)\n\n    # Independent options\n    BACKUP = 32, [\"b\", \"backup\"], \"Create backups\"\n    COMPRESS = 64, [\"c\", \"compress\"], \"Compress output\"\n\ndef process_files(options: FileProcessor):\n    if options & FileProcessor.VERBOSE:\n        print(\"Verbose mode enabled\")\n    if options & FileProcessor.BACKUP:\n        print(\"Creating backups\")\n\n# Usage\nopts = FileProcessor.VERBOSE | FileProcessor.ACCURATE | FileProcessor.BACKUP\nprocess_files(opts)\n```\n\n### Game Settings\n\n```python\nfrom highlander import ExFlag\n\nclass GraphicsSettings(ExFlag):\n    # Quality levels (mutually exclusive)\n    LOW = 1\n    MEDIUM = 2\n    HIGH = 4\n    ULTRA = 8, (LOW, MEDIUM, HIGH)\n\n    # Independent features\n    VSYNC = 16\n    HDR = 32\n    ANTIALIASING = 64\n\nclass GameConfig:\n    def __init__(self):\n        self.graphics = GraphicsSettings.MEDIUM | GraphicsSettings.VSYNC\n\n    def upgrade_quality(self):\n        # Automatically resolves conflicts\n        self.graphics |= GraphicsSettings.HIGH\n\n    def toggle_hdr(self):\n        self.graphics ^= GraphicsSettings.HDR\n\nconfig = GameConfig()\nprint(config.graphics)  # GraphicsSettings.VSYNC|MEDIUM\n\nconfig.upgrade_quality()\nprint(config.graphics)  # GraphicsSettings.VSYNC|HIGH (conflict resolved)\n```\n\n## \ud83c\udfd7\ufe0f Development\n\n### Requirements\n\n- Python 3.11+\n- uv (recommended) or pip\n\n### Setup\n\n```bash\ngit clone https://github.com/florean/highlander-enum.git\ncd highlander-enum\nmake install  # Sets up virtual environment and pre-commit hooks\n```\n\n### Testing\n\n```bash\nmake test          # Run pytest with coverage\nmake check         # Run all quality checks (linting, type checking, etc.)\ntox               # Test across multiple Python versions\n```\n\n### Building Documentation\n\n```bash\nmake docs         # Serve documentation locally\nmake docs-test    # Test documentation build\n```\n\n## \ud83d\udcc8 Project Roadmap\n\n### For 1.0\n- New conflict resolutions: smallest wins and largest wins\n- More robust constraint specification at member definition\n- Better CLI integration for OptionsFlag - more helper methods or parser-specific subclasses\n- Solidify internal API and naming\n- More real-world usage\n\n### Future Enhancements\n- Allow inheriting from and extending existing enums\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! This project maintains **100% test coverage** because reliability is paramount. Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Add comprehensive tests for new functionality (we can help!)\n4. Ensure all tests pass and coverage remains 100%\n5. Submit a pull request\n\nFor bug reports, please open an [issue](https://github.com/florean/highlander-enum/issues).\nFor feature requests or discussions about potential enhancements, start a [discussion](https://github.com/florean/highlander-enum/discussions).\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd17 Links\n\n- **Documentation**: [https://florean.github.io/highlander-enum/](https://florean.github.io/highlander-enum/)\n- **Repository**: [https://github.com/florean/highlander-enum](https://github.com/florean/highlander-enum)\n- **PyPI**: [https://pypi.org/project/highlander-enum/](https://pypi.org/project/highlander-enum/)\n\n---\n\n*\"In the end, there can be only one... flag active in each subset of flags, unless you use add_exclusions and only apply it to one side, in which case yo\u2014\ud83d\udde1\ufe0f\"*\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Better enums including flags with subsets in which there can be only one... set.",
    "version": "0.9.1",
    "project_urls": {
        "Documentation": "https://florean.github.io/highlander-enum/",
        "Homepage": "https://florean.github.io/highlander-enum/",
        "Repository": "https://github.com/florean/highlander-enum"
    },
    "split_keywords": [
        "enum",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "332c47adcb06723a75f952326c86e4f4229a627f95d6f23624816848f5dfc9ca",
                "md5": "50f97e2dc3153dbb584772453a67922c",
                "sha256": "53b355efa0f9884757ae1f6a90a3889873656d8e7c2e76abb8b942b97db276a9"
            },
            "downloads": -1,
            "filename": "highlander_enum-0.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "50f97e2dc3153dbb584772453a67922c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 19603,
            "upload_time": "2025-08-08T05:46:50",
            "upload_time_iso_8601": "2025-08-08T05:46:50.500152Z",
            "url": "https://files.pythonhosted.org/packages/33/2c/47adcb06723a75f952326c86e4f4229a627f95d6f23624816848f5dfc9ca/highlander_enum-0.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3e9f55e006ce29c589f10905ca3bfe7c8d7f51d2fc9f9763d1afdea35ea9282d",
                "md5": "d692be2b7c872bfa2b11f03cffcf19be",
                "sha256": "33d672ce0ccb231114cb67cb170b66bbc4542823a33f9a525ae62abf58b08e8e"
            },
            "downloads": -1,
            "filename": "highlander_enum-0.9.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d692be2b7c872bfa2b11f03cffcf19be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 99219,
            "upload_time": "2025-08-08T05:46:51",
            "upload_time_iso_8601": "2025-08-08T05:46:51.592874Z",
            "url": "https://files.pythonhosted.org/packages/3e/9f/55e006ce29c589f10905ca3bfe7c8d7f51d2fc9f9763d1afdea35ea9282d/highlander_enum-0.9.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-08 05:46:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "florean",
    "github_project": "highlander-enum",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "highlander-enum"
}
        
Elapsed time: 2.19070s