ai_verse
ai_verse is an open-source, production-ready AI SDK, Command Line Interface (CLI), enterprise REST API server, and containerized microservice platform for Python.
Features
- Multi-Provider Engine: Supports OpenRouter, OpenAI, Anthropic, Google Gemini, xAI Grok, Local Ollama, and Azure OpenAI.
- Automatic Fallback Chain: Transparent failover across backup providers if primary models experience downtime.
- AI Security Scanners: Integrated scanners for SMS Smishing, WhatsApp Scams, Phishing Emails, Websites, Payment Receipts, QR Codes, and Android APK Malware.
- Document & Vision Intelligence: 4-stage PDF/OCR extraction pipeline (PyMuPDF -> pdfplumber -> pypdf -> pytesseract) for ATS Resume Analysis and Receipt Processing.
- Voice Intelligence: Real speech-to-text audio transcription powered by
faster-whisper. - Enterprise REST API Server: Async FastAPI server (
/api/v1) with OpenAPI/Swagger documentation (/docs) and file upload endpoints. - Rich CLI Tool: Command-line application
ai-versepowered by Typer and Rich. - Plugin Framework: Dynamic plugin loader, manager, and lifecycle hooks (
before_request,after_request,before_scan,after_scan). - Caching System: High-performance in-memory (
MemoryCache) and persistent disk (DiskCache) caching with TTL support. - Production Containerization: Multi-stage Docker image running under non-root user
appuser(UID 10001) with healthchecks.
Architecture
┌───────────────────────────────┐
│ AI Facade (AI()) │
└──────────────┬────────────────┘
│
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Security Scans │ │ Doc & Vision │ │Voice Intelligence│
└──────────────────┘ └──────────────────┘ └──────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
▼
┌───────────────────────┐
│ Provider Factory │
└───────────┬───────────┘
│
┌───────────┬───────────┼───────────┬───────────┐
▼ ▼ ▼ ▼ ▼
┌─────────────┐┌─────────┐┌──────────┐┌─────────┐┌───────────┐
│ OpenRouter ││ OpenAI ││Anthropic ││ Gemini ││ Ollama │
└─────────────┘└─────────┘└──────────┘└─────────┘└───────────┘
Installation & Clone
git clone https://github.com/i-amshifa-06/ai_verse.git
cd ai_verse
pip install ai_verse
For extra features:
# Install with audio processing support (faster-whisper)
pip install ai_verse[audio]
# Install with document OCR support (pytesseract & pdfplumber)
pip install ai_verse[ocr]
Environment Setup
Copy .env.example to .env or set your API key:
export OPENROUTER_API_KEY="sk-or-v1-your_openrouter_api_key_here"
For other providers:
OPENAI_API_KEY: OpenAI API KeyANTHROPIC_API_KEY: Anthropic Claude API KeyGOOGLE_API_KEY: Google Gemini API KeyXAI_API_KEY: xAI Grok API KeyOLLAMA_BASE_URL: Local Ollama endpoint (defaulthttp://localhost:11434)
Quick Start Examples
1. Python SDK
from ai_verse import AI
# Initialize AI facade with OpenAI (or default OpenRouter)
ai = AI(provider="openai")
# Chat Completion
response = ai.chat("Explain zero trust network architecture in 2 sentences.")
print(response.data["text"])
# SMS Smishing Scan
sms_res = ai.scan_sms("URGENT: Your account is locked. Verify at http://bit.ly/fake")
print(f"Risk Score: {sms_res.data['risk_score']}/100 | Risk Level: {sms_res.data['risk_level']}")
# Resume Analysis
resume_res = ai.analyze_resume("resume.pdf", job_description="AppSec Engineer")
print(f"ATS Score: {resume_res.data['ats_score']}%")
2. Command Line Interface (CLI)
ai-verse chat "Explain quantum computing in simple terms."
ai-verse scan sms "Verify account at http://bit.ly/fake"
ai-verse resume analyze resume.pdf --job-description "AppSec Engineer"
ai-verse doctor
3. FastAPI REST API Server
uvicorn ai_verse.api.main:app --host 0.0.0.0 --port 8000 --reload
Visit http://localhost:8000/docs for Swagger UI.
4. Production Docker
docker build -f docker/Dockerfile -t ai-verse:latest .
docker run -d --name ai-verse-server \
-p 8000:8000 \
-e OPENROUTER_API_KEY="your_api_key_here" \
ai-verse:latest
Showcase & Frontend Integrations
Complete cross-platform showcase examples available under examples/showcase/:
- React / Next.js:
examples/showcase/nextjs_route_snippet.ts - Flutter:
examples/showcase/flutter_client.dart - Electron:
examples/showcase/electron_preload.js - Node.js:
examples/showcase/nodejs_client.js
Documentation
Full documentation is available at https://i-amshifa-06.github.io/ai_verse or under docs/:
Contributing
We welcome community contributions! Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
License
ai_verse is licensed under the MIT License.
Metadata
Release files for ai-verse 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_verse-1.0.2.tar.gz | 86.4 kB | Without provenance | Details for ai_verse-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_verse-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for ai_verse-1.0.2-py3-none-any.whl |
Total release size: 186.3 kB
Release files / ai_verse-1.0.2.tar.gz
| Download URL | ai_verse-1.0.2.tar.gz |
|---|---|
| Size | 86.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b31053a8eeb2e32fccc709880ec06d1cdf75e0f972a382d42cae06485482f16e
|
|
BLAKE2b-256 checksum How to use checksums |
02115db3b3a88ee5c3664dd2756d84c29cf442e6605b4b2bad792a71e280c686
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / ai_verse-1.0.2-py3-none-any.whl
| Download URL | ai_verse-1.0.2-py3-none-any.whl |
|---|---|
| Size | 99.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
270b9208c67bc2bc31b2d70281fce67855f597dedba9442107c04784b0f7a355
|
|
BLAKE2b-256 checksum How to use checksums |
3523ee6e5a9c5807203767c213e8a768c9ce91f55692a2f59b68830cb343f748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for ai-verse 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.