# Username Safety

A Python package to check username safety and validity.

## Features

- **Length Check**: Ensures username is within min/max length.
- **Character Check**: Ensures username contains only allowed characters (alphanumeric, underscore, hyphen).
- **Profanity Check**: Checks against a list of profane words.
- **Similarity Check**: Checks if the username is too similar to the user's real name.

## Installation

```bash
pip install username-safety
```

## Usage

```python
from username_safety import UsernameChecker

checker = UsernameChecker()

# Basic validation
is_valid, messages = checker.validate("cool_user_123")
if is_valid:
    print("Username is valid!")
else:
    print("Errors:", messages)

# Check with real name similarity
is_valid, messages = checker.validate("johndoe", real_name="John Doe")
# Returns False, ["Username is too similar to real name (similarity: 1.00)"]
```

## Development

To run tests:

```bash
python -m unittest discover tests
```
