Metadata-Version: 2.4
Name: perry-py-lib-template
Version: 0.1.6
Summary: Test Python library
License: MIT
License-File: LICENSE
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Py Lib Template

A Python library template with modern packaging setup for PyPI publishing.

## Installation

```bash
pip install py-lib-template
```

## Usage

### Basic Addition

```python
from lib import add

# Add two numbers
result = add(1, 2)
print(result)  # 3

# Works with floats too
result = add(1.5, 2.5)
print(result)  # 4.0
```

### Adding Multiple Numbers

```python
from lib import add_many

# Add multiple numbers
result = add_many(1, 2, 3, 4, 5)
print(result.value)     # 15
print(result.operands)  # [1, 2, 3, 4, 5]
```

## Development

### Setup

```bash
# Create virtual environment
python -m venv venv

# Activate (Windows)
venv\Scripts\activate

# Activate (Unix/Mac)
source venv/bin/activate

# Install in development mode
pip install -e ".[dev]"
```

### Build

```bash
# Build the package
python build_lib.py

# Or manually
python -m build --outdir pypi_publish
```

### Test

```bash
pytest
```

### Lint & Format

```bash
# Format code
black lib tests

# Lint
ruff lib tests

# Type check
mypy lib
```

### Publish

```bash
# Build first
python build_lib.py

# Publish to PyPI (requires credentials)
cd pypi_publish
python -m twine upload *
```

## Project Structure

```
py_lib_template/
├── lib/                    # Library source code
│   ├── __init__.py        # Package entry point
│   └── math_utils.py      # Example module
├── pypi_publish/          # Build artifacts (wheel, sdist)
├── tests/                 # Test files
├── pyproject.toml         # Package configuration
└── README.md
```

## License

MIT
