Metadata-Version: 2.4
Name: zip2tz
Version: 0.1.0
Summary: A simple timezone lookup by zip code
Author-email: kylehogate <kyle.holgate@gmail.com>
License-File: LICENSE
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# zip2tz

A simple Python library to look up timezones by US zip code.

## Installation

```bash
pip install zip2tz
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv add zip2tz
```

## Usage

```python
import zip2tz

# Get timezone for a zip code
tz = zip2tz.timezone("90210")
print(tz)  # America/Los_Angeles

# Returns None if zip code not found
tz = zip2tz.timezone("00000")
print(tz)  # None
```

## API

### `timezone(zipcode: str) -> str | None`

Returns the IANA timezone string (e.g., `"America/New_York"`) for the given zip code, or `None` if the zip code is not found.

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency management.

```bash
# Clone the repo
git clone https://github.com/yourusername/zip2tz.git
cd zip2tz

# Build
uv build

# Run tests
uv venv .venv-test
uv pip install dist/zip2tz-*.whl -p .venv-test
.venv-test/Scripts/python tests/smoke_test.py  # Windows
# .venv-test/bin/python tests/smoke_test.py    # Linux/Mac
```

## License

MIT License - see [LICENSE](LICENSE) for details.
