Metadata-Version: 2.4
Name: linkbox-tools
Version: 0.1.0
Summary: Simple URL validation and normalization utilities for LinkBox
Author-email: Your Name <you@example.com>
License: MIT
Project-URL: Homepage, https://example.com/linkbox-tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# linkbox-tools

A tiny reusable Python package that provides simple URL normalization and validation utilities. It is used by the **LinkBox** Django application to ensure that saved links are clean and safe.

## Features

- `normalize_url(url: str) -> str` – trims whitespace, adds a default `https://` scheme when missing, and validates the URL.
- `is_valid_url(url: str) -> bool` – checks that a URL has an `http` or `https` scheme and a hostname.

Both functions raise clear errors for malformed input and are fully unit‑tested.

## Installation (local)

```bash
# From the workspace root
cd linkbox-workspace/linkbox-tools
python -m venv .venv
source .venv/bin/activate
pip install -e .
```

The `-e` flag installs the package in *editable* mode so that changes are reflected immediately.

## Running the tests

```bash
source .venv/bin/activate
python -m unittest discover -s tests
```

## Building for PyPI (optional)

```bash
pip install build
python -m build
```

The resulting files are placed in the `dist/` directory and can be uploaded with `twine`.

## Why a reusable package?

Separating URL handling into its own package demonstrates good software engineering practice: code that is needed in multiple projects lives in a single, well‑tested location. This makes maintenance easier and encourages reuse.
