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
# Direct prompts (easiest way!)
aiwand "Ten fun names for a pet pelican"
aiwand "Explain quantum computing in simple terms"
aiwand "Write a haiku about programming"
# Or use specific commands
aiwand summarize "Your text here" --style bullet-points
aiwand chat "What is machine learning?"
aiwand generate "Write a story about AI"
🔧 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.3.0.tar.gz
(19.0 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.3.0.tar.gz.
File metadata
- Download URL: aiwand-0.3.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28efb85e015a332b29cbe6514f554fb1b949aafd88479211086ebe4fa9ceb4f0
|
|
| MD5 |
c8ca1cef450d3f2f12fc7714e326be3c
|
|
| BLAKE2b-256 |
b6f3ca72011d4cf912508424a234f664948600ea464039d7dcb5e358b03200f8
|
File details
Details for the file aiwand-0.3.0-py3-none-any.whl.
File metadata
- Download URL: aiwand-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.8 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 |
cf00c26a7f4481dbea02f75c2e58c2f06f3853216139b11b52e08aaaeb067388
|
|
| MD5 |
70bc81b9a8e2d9b7a7e841c514d9df4f
|
|
| BLAKE2b-256 |
c5827779452754b326cffae67735888c4170fe32d1a97efeb0f129a501146606
|