Metadata-Version: 2.4
Name: spamdetector-client
Version: 0.1.0
Summary: Python client for the Spam Detector API.
Author: Bilal Khan
License-Expression: MIT
Project-URL: Homepage, https://spamdetactor5-9bz78yna.b4a.run
Project-URL: API, https://spamdetactor5-9bz78yna.b4a.run/predict
Keywords: spam,detector,api,client
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Dynamic: license-file

# Spam Detector Client

Python library for calling the Spam Detector API.

## Install locally

```bash
pip install -e .
```

After publishing to PyPI, users will install it with:

```bash
pip install spamdetector-client
```

## Usage

OpenAI-style client usage:

```python
from spamdetector import SpamDetector

client = SpamDetector(api_key="YOUR_API_KEY")
result = client.messages.create(message="Win a free iPhone today!")

print(result.prediction)
print(result.confidence)
```

Simple function usage:

```python
from spamdetector import predict

result = predict("Win a free iPhone today!", api_key="YOUR_API_KEY")
print(result.to_dict())
```

You can also keep the API key in an environment variable:

```bash
set SPAMDETECTOR_API_KEY=YOUR_API_KEY
```

```python
from spamdetector import predict

result = predict("Your message here")
print(result.to_dict())
```

## Publish to PyPI

Update `pyproject.toml` first:

- Change `authors`
- Confirm the package name is available on PyPI
- Bump `version` whenever you publish a new release

Then run:

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*
```
