# AIWand 🪄
> A simple and elegant Python package for AI-powered text processing using OpenAI and Google Gemini APIs.
[](https://pypi.org/project/aiwand/)
[](https://pypi.org/project/aiwand/)
[](https://github.com/onlyoneaman/aiwand/blob/main/LICENSE)
## ✨ 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
```bash
# Using pip
pip install aiwand
# With virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # Linux/Mac
pip install aiwand
```
### Basic Usage
```python
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
```bash
# 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:
```bash
# 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](docs/installation.md)** - Detailed setup instructions
- **[API Reference](docs/api-reference.md)** - Complete function documentation
- **[CLI Reference](docs/cli.md)** - Command line usage
- **[Virtual Environment Guide](docs/venv-guide.md)** - Best practices for Python environments
## 🤝 Connect
- **GitHub**: [github.com/onlyoneaman/aiwand](https://github.com/onlyoneaman/aiwand)
- **PyPI**: [pypi.org/project/aiwand](https://pypi.org/project/aiwand/)
- **X (Twitter)**: [@onlyoneaman](https://x.com/onlyoneaman)
## 📝 License
MIT License - see [LICENSE](LICENSE) file for details.
---
**Made with ❤️ by [Aman Kumar](https://x.com/onlyoneaman)**
Raw data
{
"_id": null,
"home_page": "https://github.com/onlyoneaman/aiwand",
"name": "aiwand",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Aman Kumar",
"author_email": "2000.aman.sinha@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0a/9d/adbd53d92d736ee6ee49ac78a9dcb834dde7d7a0a0a0f215b57978b9c459/aiwand-0.1.0.tar.gz",
"platform": null,
"description": "# AIWand \ud83e\ude84\n\n> A simple and elegant Python package for AI-powered text processing using OpenAI and Google Gemini APIs.\n\n[](https://pypi.org/project/aiwand/)\n[](https://pypi.org/project/aiwand/)\n[](https://github.com/onlyoneaman/aiwand/blob/main/LICENSE)\n\n## \u2728 Features\n\n- **Smart Provider Selection** - Automatically uses OpenAI or Gemini based on available keys\n- **Text Summarization** - Create concise, detailed, or bullet-point summaries \n- **AI Chat** - Have conversations with context history\n- **Text Generation** - Generate content from prompts\n- **CLI Interface** - Use from command line\n- **Virtual Environment Ready** - Easy setup with automated scripts\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\n# Using pip\npip install aiwand\n\n# With virtual environment (recommended)\npython -m venv .venv\nsource .venv/bin/activate # Linux/Mac\npip install aiwand\n```\n\n### Basic Usage\n\n```python\nimport aiwand\n\n# Set your API key\naiwand.configure_api_key(\"your-api-key\", \"openai\") # or \"gemini\"\n\n# Summarize text\nsummary = aiwand.summarize(\"Your long text here...\")\n\n# Chat with AI \nresponse = aiwand.chat(\"What is machine learning?\")\n\n# Generate text\nstory = aiwand.generate_text(\"Write a poem about coding\")\n```\n\n### CLI Usage\n\n```bash\n# Summarize text\naiwand summarize \"Your text here\" --style bullet-points\n\n# Chat with AI\naiwand chat \"Explain quantum computing\"\n\n# Generate content\naiwand generate \"Write a haiku about programming\"\n```\n\n## \ud83d\udd27 Configuration\n\nSet your API keys via environment variables:\n\n```bash\n# Option 1: OpenAI\nexport OPENAI_API_KEY=\"your-openai-key\"\n\n# Option 2: Gemini \nexport GEMINI_API_KEY=\"your-gemini-key\"\n\n# Option 3: Both (set preference)\nexport OPENAI_API_KEY=\"your-openai-key\"\nexport GEMINI_API_KEY=\"your-gemini-key\"\nexport AI_DEFAULT_PROVIDER=\"gemini\" # or \"openai\"\n```\n\nOr use a `.env` file:\n```\nOPENAI_API_KEY=your-openai-key\nGEMINI_API_KEY=your-gemini-key\nAI_DEFAULT_PROVIDER=openai\n```\n\n## \ud83d\udcda Documentation\n\n- **[Installation Guide](docs/installation.md)** - Detailed setup instructions\n- **[API Reference](docs/api-reference.md)** - Complete function documentation \n- **[CLI Reference](docs/cli.md)** - Command line usage\n- **[Virtual Environment Guide](docs/venv-guide.md)** - Best practices for Python environments\n\n## \ud83e\udd1d Connect\n\n- **GitHub**: [github.com/onlyoneaman/aiwand](https://github.com/onlyoneaman/aiwand)\n- **PyPI**: [pypi.org/project/aiwand](https://pypi.org/project/aiwand/)\n- **X (Twitter)**: [@onlyoneaman](https://x.com/onlyoneaman)\n\n## \ud83d\udcdd License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n**Made with \u2764\ufe0f by [Aman Kumar](https://x.com/onlyoneaman)** \n",
"bugtrack_url": null,
"license": null,
"summary": "A simple AI toolkit for text processing using OpenAI and Gemini APIs",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/onlyoneaman/aiwand"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b8b8dbd6734945860aaabe7901b6b4d7a85c32dd775ef2f5dbe1cb339a8f7a44",
"md5": "6c0d25b47bd3517e8abbd4a285a7b3dc",
"sha256": "13e0597662c2fffa8de186927ac09eea334c48f1393e0552f1c14b3e722279d9"
},
"downloads": -1,
"filename": "aiwand-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c0d25b47bd3517e8abbd4a285a7b3dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7631,
"upload_time": "2025-06-22T21:30:42",
"upload_time_iso_8601": "2025-06-22T21:30:42.887123Z",
"url": "https://files.pythonhosted.org/packages/b8/b8/dbd6734945860aaabe7901b6b4d7a85c32dd775ef2f5dbe1cb339a8f7a44/aiwand-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0a9dadbd53d92d736ee6ee49ac78a9dcb834dde7d7a0a0a0f215b57978b9c459",
"md5": "efc2cd6a3651b4335ec1dd3ba49292cb",
"sha256": "a39d5173deba68f0721bd78db24d0224943662fa146b79c1d313da58340b0314"
},
"downloads": -1,
"filename": "aiwand-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "efc2cd6a3651b4335ec1dd3ba49292cb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 14048,
"upload_time": "2025-06-22T21:30:44",
"upload_time_iso_8601": "2025-06-22T21:30:44.046811Z",
"url": "https://files.pythonhosted.org/packages/0a/9d/adbd53d92d736ee6ee49ac78a9dcb834dde7d7a0a0a0f215b57978b9c459/aiwand-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-06-22 21:30:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "onlyoneaman",
"github_project": "aiwand",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "openai",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"0.19.0"
]
]
}
],
"lcname": "aiwand"
}