Metadata-Version: 2.4
Name: cwp-utils
Version: 1.0.0
Summary: A reusable Python utility package containing math, string, and validation utilities.
Author: Faith Kalu Onyeani
License: MIT
Keywords: python,utilities,package,validation,strings,math
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: license
Dynamic: license-file

# CWP Utils

A reusable Python utility package built as part of the **CWP Python Expert Programming Week 2 Project**.

This package contains reusable utility functions that can be imported into any Python project to perform common tasks such as mathematical calculations, string manipulation, and data validation.

---

## Project Structure

```
Reusable Utility Package/
│
├── cwp_utils/
│   ├── __init__.py
│   ├── math_utils.py
│   ├── string_utils.py
│   └── validation.py
│
├── examples.py
├── README.md
├── pyproject.toml
└── LICENSE
```

---

## Features

### Math Utilities

- Calculate BMI
- Calculate Grade
- Check if a number is Prime
- Format Currency

### String Utilities

- Capitalize Words
- Generate Random Passwords
- Reverse Text

### Validation Utilities

- Validate Email Address
- Validate Phone Number
- Validate Password

---

## Installation

Clone the repository:

```bash
git clone https://github.com/your-username/cwp-utils.git
```

Navigate into the project folder:

```bash
cd cwp-utils
```

---

## Usage

Import any function directly from the package.

```python
from cwp_utils import (
    calculate_bmi,
    calculate_grade,
    is_prime,
    format_currency,
    capitalize_words,
    generate_password,
    reverse_text,
    validate_email,
    validate_phone,
    validate_password
)
```

### Example

```python
print("\n Calculate Grsde")
print(calculate_grade(50))
print(calculate_grade(90))

print("\n calculate BMI")
print(calculate_bmi(75, 6.6))
print(calculate_bmi(85, 5.6))

print("\n Is prime number")
print(is_prime(2))
print(is_prime(12))

print("\n Formart currency")
print(format_currency(2000))
print(format_currency(20000000))

print("\n Capitalize word")
print(capitalize_words("faith kalu onyeani"))

print("\n Generate password")
print(generate_password(8))

print("\n Reversed text")
print(reverse_text("Faith"))

print("\n Validate Email")
print(validate_email("fkaluonyeani@gmail.com"))
print(validate_email("fkaluonyeani@gmail"))

print("\n Validate Phone")
print(validate_phone("09161027545"))

print("\n Validate Password")
print(validate_password("Faith123"))
```

---

## Example Output

```text
 Calculate Grsde
 Grade is 50 you scored C
 Grade is 90 you scored A

 calculate BMI
Your weight is: 75kg, Your height is: 6.6m, Your BMI: 1.7217630853994492
Your weight is: 85kg, Your height is: 5.6m, Your BMI: 2.71045918367347

 Is prime number
True
False

 Formart currency
₦2,000.00
₦20,000,000.00

 Capitalize word
Faith Kalu Onyeani

 Generate password
 nsLAU9N4

 Reversed text
htiaF

 Validate Email
True
False

 Validate Phone
True

 Validate Password
True
```

> Note: The generated password will be different each time because it is randomly generated.

---

## Skills Learned

This project helped me understand and practice:

- Creating Python modules
- Building Python packages
- Using `__init__.py`
- Importing functions between modules
- Writing reusable functions
- String manipulation
- Mathematical operations
- Data validation
- Project organization
- Package configuration using `pyproject.toml`
- Creating project documentation with Markdown

---

## Technologies Used

- Python 3
- Standard Python Libraries

---

## Author

**Faith Kalu Onyeani**

GitHub: https://github.com/beautifulone0

---

## License

This project is licensed under the MIT License.
