Metadata-Version: 2.1
Name: handy-utils
Version: 0.0.1a8
Summary: Collection of handy utils for Python.
Keywords: Python
Author-email: Li Yun <leven.cn@gmail.com>
Maintainer-email: Li Yun <leven.cn@gmail.com>
Requires-Python: ~=3.9
Description-Content-Type: text/markdown
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Typing :: Typed
Requires-Dist: sphinx ; extra == "doc"
Requires-Dist: pre-commit ; extra == "test"
Requires-Dist: black ; extra == "test"
Requires-Dist: isort ; extra == "test"
Requires-Dist: mymy ; extra == "test"
Requires-Dist: flake8 >= 4.0 ; extra == "test"
Requires-Dist: pyupgrade ; extra == "test"
Requires-Dist: pytest >= 7.1 ; extra == "test"
Requires-Dist: coverage >= 6.4 ; extra == "test"
Requires-Dist: pytest-cov >= 3.0 ; extra == "test"
Project-URL: Documentation, https://github.com/leven-cn/handy.py
Project-URL: Home, https://github.com/leven-cn/handy.py
Project-URL: Source, https://github.com/leven-cn/handy.py
Provides-Extra: doc
Provides-Extra: test

# Handy Python

[![Test](https://github.com/leven-cn/handy.py/actions/workflows/test.yml/badge.svg)](https://github.com/leven-cn/handy.py/actions/workflows/test.yml)
[![Lint](https://github.com/leven-cn/handy.py/actions/workflows/lint.yml/badge.svg)](https://github.com/leven-cn/handy.py/actions/workflows/lint.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

Collection of handy utils for Python.

## Usage

```bash
pip install handy-utils
```

```python
from handy_utils import xxx
```

## Features

- MapReduce on local host
- Decorators
  - **`@attrs`**: Add attributes to a function/method.
  - **`@accepts`** and **`@returns`**: Enforce function argument and return types.
  - **`@singleton`**: Define a class with a singleton instance.
- Regex patterns
  - Regex pattern of Chinese characters
  - Find Chinese characters in a string
  - Regex pattern of float numbers
  - Float number validation
  - Regex pattern of IPv4 addresses
  - IPv4 address validation
  - Regex pattern of email addresses
  - Email address validation
  - Regex pattern of HTML elements or tags
  - HTML element or tag validation
  - Regex pattern of domain names (English, Chinese)
  - Domain name validation (English, Chinese)
  - Regex pattern of color RGB hex
  - Color RGB hex validation
  - Password strength validation
  - Regex pattern of license plate (Chinese mainland, Hongkong)
  - License plate validation (Chinese mainland, Hongkong)
  - Regex pattern of WeChat (Wexin) ID
  - WeChat (Wexin) ID validation
  - Regex pattern of QQ number (ID)
  - QQ number (ID) validation
  - Regex pattern of Chinese telephone number
  - Chinese telephone number validation
  - Regex pattern of Chinese ID number
  - Chinese ID number validation

## Scripts

### Run a GUI (based on Tcl/Tk) for RE (regular expression)

```bash
python -m handy_utils.re_tk
```

## License

[Apache License 2.0](https://github.com/leven-cn/handy.py/blob/master/LICENSE)

