Metadata-Version: 2.1
Name: avahi-summarizer
Version: 0.2
Summary: Summarizes an article with the use of Claude3 Sonnet model by setting env variables
Description-Content-Type: text/markdown
Requires-Dist: boto3

# Avahi Summarizer

[![PyPI version](https://img.shields.io/pypi/v/avahi-summarizer.svg)](https://pypi.org/project/avahi-summarizer/)

The Avahi Summarizer Python library provides convenient access to AWS Bedrock's Claude 3 Sonnet model for text summarization. It allows you to easily summarize text using the power of AWS Bedrock from any Python 3.7+ application.

## Installation

```sh
pip install avahi-summarizer
```

## Usage

The full API of this library can be found in the source code.

```python
import os
from avahi_summarizer import summarize_text

# Set your AWS credentials as environment variables
os.environ['AWS_ACCESS_KEY_ID'] = 'your_access_key_id'
os.environ['AWS_SECRET_ACCESS_KEY'] = 'your_secret_access_key'
os.environ['AWS_REGION'] = 'your_aws_region'

text_to_summarize = """
Your long text goes here...
"""

summary = summarize_text(text_to_summarize)
print(summary)
```

We recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
to add your AWS credentials to a `.env` file so that your API keys are not stored in source control.

## Features

- Easy-to-use interface for text summarization
- Utilizes AWS Bedrock's Claude 3 Sonnet model
- Automatic handling of AWS Bedrock client creation and API calls

## Configuration

Before using the library, make sure to set the following environment variables:

- `AWS_ACCESS_KEY_ID`: Your AWS access key ID
- `AWS_SECRET_ACCESS_KEY`: Your AWS secret access key
- `AWS_REGION`: The AWS region where your Bedrock resources are located

## Functions

### `summarize_text(text: str) -> str`

Summarizes the provided text using AWS Bedrock's Claude 3 Sonnet model.

Parameters:
- `text` (str): The input text to be summarized.

Returns:
- `str`: A 3-5 line summary of the input text.

### `hello()`

A simple function to verify that the package is installed correctly.

### `get_bedrock_client()`

Creates and returns an AWS Bedrock client using the configured environment variables.

## Error Handling

The library will raise a `ValueError` if the required AWS credentials are not set as environment variables.

## Requirements

- Python 3.7 or higher
- `boto3` library

## Contributing

We welcome contributions to the Avahi Summarizer library! Please feel free to submit issues, fork the repository and send pull requests!

## License

[MIT License](LICENSE)

## Support

If you encounter any problems or have any questions, please open an issue on the [GitHub repository](https://github.com/yourusername/avahi-summarizer).
