Metadata-Version: 2.1
Name: stringliteral
Version: 0.0.1
Summary: stringliteral
Home-page: UNKNOWN
License: UNKNOWN
Author: Sander Teunissen
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pylint ; extra == "dev"
Requires-Dist: nox ; extra == "dev"
Requires-Dist: pytest-cov ; extra == "dev"
Requires-Dist: coverage[toml]>=5.0.3 ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: pytest ; extra == "test"
Requires-Dist: pytest-asyncio ; extra == "test"
Requires-Dist: pytest-mock ; extra == "test"
Provides-Extra: dev
Provides-Extra: test

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# stringliteral

```python
from stringliteral import StringLiteral

class AllowedValues(StringLiteral):
    LEFT="left"
    RIGHT="right"

value = AllowedValues.LEFT

AllowedValues.contains("left") # returns True
AllowedValues.contains("up") # returns False
```

Define your class attributes with ALL CAPS only. Non CAP attributes will be ignored.

I created this for my own usage after tripping over using the built in Enum class many, many times..

