A simple AI-powered text summarization helper using Groq API.
Project description
maria_summarize_text_ai_assistant
A simple Python library to summarize long text using an AI API (Groq).
Features
- AI-powered text summarization
- Clean API design
- Docstrings included
- Easy to use in Flask or any Python app
- Automatic
.envfile support for API key configuration
Installation
pip install maria_summarize_text_ai_assistant
The package automatically installs groq and python-dotenv dependencies.
Usage
Method 1: Using .env file (Recommended)
- Create a
.envfile in your project directory:
GROQ_API_KEY=your_actual_groq_api_key_here
- Use the library in your code:
from maria_summarize_text_ai_assistant import summarize_text
long_text = "Artificial intelligence is transforming industries..."
summary = summarize_text(long_text)
print(summary)
Method 2: Set environment variable manually
import os
from maria_summarize_text_ai_assistant import summarize_text
# Set your API key in environment
os.environ["GROQ_API_KEY"] = "YOUR_GROQ_API_KEY"
long_text = "Artificial intelligence is transforming industries..."
summary = summarize_text(long_text)
print(summary)
Publishing Updates
Update setup.py version number, then rebuild your package:
python setup.py sdist bdist_wheel
Upload to PyPI:
python -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maria_summarize_text_ai_assistant-0.1.6.tar.gz.
File metadata
- Download URL: maria_summarize_text_ai_assistant-0.1.6.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f36710c6b6327f31151326ebd6f1c67c8469eed7f12ef9285defca2b6d902b1
|
|
| MD5 |
c510a298b2ed1d492af01ed9a28f9116
|
|
| BLAKE2b-256 |
468bc2cc1e0c449b75408cbb22a14113b3a50b582bcfcab11d0012e6387865eb
|
File details
Details for the file maria_summarize_text_ai_assistant-0.1.6-py3-none-any.whl.
File metadata
- Download URL: maria_summarize_text_ai_assistant-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6be50163bd65c2c1b0b0ec4edb0ea751f8b857d4fa49aa10961888477252a72e
|
|
| MD5 |
48edb139ab6847e6049824cf14d6b6f6
|
|
| BLAKE2b-256 |
68383197ce855ec98b7a93830d523c247ac093c7da8114d759da98abfd0bde7c
|