A simple AI toolkit for text processing using OpenAI and Gemini APIs
Project description
AIWand 🪄
A simple and elegant Python package for AI-powered text processing using OpenAI and Google Gemini APIs.
✨ Features
- Smart Provider Selection - Automatically uses OpenAI or Gemini based on available keys
- Text Summarization - Create concise, detailed, or bullet-point summaries
- AI Chat - Have conversations with context history
- Text Generation - Generate content from prompts
- CLI Interface - Use from command line
- Virtual Environment Ready - Easy setup with automated scripts
🚀 Quick Start
Installation
# Using pip
pip install aiwand
# With virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # Linux/Mac
pip install aiwand
Basic Usage
import aiwand
# Set your API key
aiwand.configure_api_key("your-api-key", "openai") # or "gemini"
# Summarize text
summary = aiwand.summarize("Your long text here...")
# Chat with AI
response = aiwand.chat("What is machine learning?")
# Generate text
story = aiwand.generate_text("Write a poem about coding")
CLI Usage
# Summarize text
aiwand summarize "Your text here" --style bullet-points
# Chat with AI
aiwand chat "Explain quantum computing"
# Generate content
aiwand generate "Write a haiku about programming"
🔧 Configuration
Set your API keys via environment variables:
# Option 1: OpenAI
export OPENAI_API_KEY="your-openai-key"
# Option 2: Gemini
export GEMINI_API_KEY="your-gemini-key"
# Option 3: Both (set preference)
export OPENAI_API_KEY="your-openai-key"
export GEMINI_API_KEY="your-gemini-key"
export AI_DEFAULT_PROVIDER="gemini" # or "openai"
Or use a .env file:
OPENAI_API_KEY=your-openai-key
GEMINI_API_KEY=your-gemini-key
AI_DEFAULT_PROVIDER=openai
📚 Documentation
- Installation Guide - Detailed setup instructions
- API Reference - Complete function documentation
- CLI Reference - Command line usage
- Virtual Environment Guide - Best practices for Python environments
🤝 Connect
- GitHub: github.com/onlyoneaman/aiwand
- PyPI: pypi.org/project/aiwand
- X (Twitter): @onlyoneaman
📝 License
MIT License - see LICENSE file for details.
Made with ❤️ by Aman Kumar
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiwand-0.2.0.tar.gz
(18.1 kB
view details)
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 aiwand-0.2.0.tar.gz.
File metadata
- Download URL: aiwand-0.2.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb1411962053bb4a0ba636714ff9b1065a4a9c4152dabe9e5a0080d11a851e85
|
|
| MD5 |
4bc4981092278d807dcc8398a42894f4
|
|
| BLAKE2b-256 |
f2dab79dd1921941fefa7b3b05352b7c7c1e0ff80f32207a995758966688e915
|
File details
Details for the file aiwand-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aiwand-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e5d923a4c7e12792c86e2e609e73f7ef151be947bb48ee670313c370fd48099
|
|
| MD5 |
8170d0b2974994f0e5dac0104a0ccc71
|
|
| BLAKE2b-256 |
8c1868fca05b9ec5068029b2029464a1db0fa94da03d1fc3a49389f7c6a24978
|