semvec/pypi-packages huggingface dataset:
awsume-bitwarden-plugin 0.0.1
a small helper for awsume and bitwarden
Requires Python: >=3.8


# Awsume Bitwarden Plugin

> The initial code was copied from [xeger](https://github.com/xeger/awsume-bitwarden-plugin). Thanks for this great starting point ❤️

_Awsume 4+ only_.

This is a plugin that automates the entry of MFA tokens using Bitwarden.
It fetches the totp token automatically from your Bitwarden vault.

## Support

If you experience any problems, please [file a bug report](https://github.com/danto7/awsume-bitwarden-plugin/issues/new?assignees=xeger&template=bug_report.md).

## Installation

### Install This Plugin

```
pip3 install awsume-bitwarden-plugin
```

If you've installed awsume with `pipx`, this will install the console plugin in awsume's virtual environment:

```
pipx inject awsume awsume-bitwarden-plugin
```

### Requirements

* bitwarden cli
* bitwarden needs to be unklocked and the session token has to be in the `BW_SESSION` env variable

### Configure AWSume

This plugin needs to know which bitwarden vault item to use for each MFA token.
You can specify the arn of the mfa device as an additional uri in your bitwarden item.


## Troubleshooting

If you experience any trouble, invoke `awsume` with the `--debug` flag and look for log entries that contain `bitwarden`.

The specific command that this plugin invokes is `bw get totp "mfa device arn here"`; make sure it succeeds without prompting a password when you invoke it manually.

If you can't solve your problem, [create a GitHub issue](https://github.com/danto7/awsume-bitwarden-plugin/issues/new) with diagnostic details and we'll try to help you.
enumhandler 0.2.0
A class that allows the definition of handlers for an enum class, along withdefinition-time type and exhaustivity checks.
Requires Python: >=3.8

# EnumHandler

If you're like me, you were disappointed to see that structural pattern matching ([PEP 622]) landed in Python without any of the proposed exhaustiveness guarantees ([PEP 634]).
Although `match` and `case` are still useful, exhaustive matching over an enum is a comfortable idiom in other languages, and I was looking forward to first-class treatment of this in Python.
Worse, I ended up writing a number of repetitive exhaustiveness tests:

```python
import pytest

from myproject import Colors, name_of_color

@pytest.parametrize(MyEnum)
def test_name_of_color_exhaustiveness(value):
    assert name_of_color(value)
```

Tests that don't care about the return value of the function under test are a hallmark of type system failures.

This library fixes that by providing a base class for classes that exhaustively cover an enumeration.
Upon class definition, `EnumHandler` will validate the exhaustiveness and uniqueness of handlers registered on any subclass using the `EnumHandler.register` decorator.

```python
from enum import Enum, auto

from enumhandler import EnumHandler, handles


class Colors(Enum):
    RED = auto()
    GREEN = auto()
    BLUE = auto()


class NameOfColor(EnumHandler, enum=Colors):
    @handles(Colors.RED)
    def red(self) -> str:
        return "Red"

    @handles(Colors.GREEN)
    def green(self) -> str:
        return "Green"

    @handles(Colors.BLUE)
    def blue(self) -> str:
        return "Blue"
```

The class is instantiated with a member of the enum, and the resulting instance is callable:

```pycon
>>> print(NameOfColor(Colors.RED)())
Red
```

An `InvalidEnumHandler` exception is raised in three cases:

- Not all enum values are handled.
- One enum value has multiple registered handlers.
- A handler is registered for the incorrect enum.
- A handler is registered on an existing class.

Please note that subclassing is currently not supported.

[PEP 622]: https://peps.python.org/pep-0622/
[PEP 634]: https://peps.python.org/pep-0634/