Skip to main content

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.

PyPI version Python versions 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

# 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

🤝 Connect

📝 License

MIT License - see LICENSE file for details.


Made with ❤️ by Aman Kumar

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

aiwand-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiwand-0.2.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

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

Hashes for aiwand-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fb1411962053bb4a0ba636714ff9b1065a4a9c4152dabe9e5a0080d11a851e85
MD5 4bc4981092278d807dcc8398a42894f4
BLAKE2b-256 f2dab79dd1921941fefa7b3b05352b7c7c1e0ff80f32207a995758966688e915

See more details on using hashes here.

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

Hashes for aiwand-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5d923a4c7e12792c86e2e609e73f7ef151be947bb48ee670313c370fd48099
MD5 8170d0b2974994f0e5dac0104a0ccc71
BLAKE2b-256 8c1868fca05b9ec5068029b2029464a1db0fa94da03d1fc3a49389f7c6a24978

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page