Metadata-Version: 2.4
Name: chars-counter
Version: 0.2.0
Summary: Chars counter console util
Author: Alexander Zakorko
Author-email: Alexander Zakorko <alex.zakorko2015@gmail.com>
License-Expression: MIT
Requires-Dist: click>=8.4.1
Requires-Dist: levenshtein>=0.27.3
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# chars-counter

A small Python utility that counts, per ASCII character category, how many characters appear **exactly once** in a given string.

## Requirements

- Python ≥ 3.14

## Installation

```bash
uv sync
```

## Usage

```python
from src import get_once_seen_chars_categories_count
from src.consts import ASCIICharCategories

result = get_once_seen_chars_categories_count("Hello")
# {'uppercase_letters': 1, 'lowercase_letters': 2}
# 'H' appears once (Uppercase), 'e' and 'o' appear once (Lowercase), 'l' appears twice (ignored)
```

The returned dictionary maps `ASCIICharCategories` members to the count of unique characters in that category. Categories with no once-seen characters are omitted.

## ASCII character categories

| Category             | Code points              |
|----------------------|--------------------------|
| `Control_Characters` | 0–31, 127 |
| `Space` | 32 |
| `Punctuation` | 33–47, 58–64, 91–96, 123–126 |
| `Digits` | 48–57 (`0`–`9`) |
| `Uppercase_Letters` | 65–90 (`A`–`Z`) |
| `Lowercase_Letters` | 97–122 (`a`–`z`) |

Passing a string that contains non-ASCII characters raises `NotAsciiCharacterProvidedError`.

## Running tests

```bash
pytest
```

## Running with coverage

```bash
coverage run -m pytest && coverage report
```
