Python SDK for creating verse-based content sites with AI translations, multimedia (images, audio), semantic search, and deployment
Project description
Sanatan SDK - Python SDK for Spiritual Verse Collections
Complete toolkit for generating rich multimedia content for spiritual text collections (Hanuman Chalisa, Sundar Kaand, etc.)
Features
- 🔄 Complete Workflow: Generate media and embeddings from canonical sources - all in one command
- 📖 Canonical Sources: Local YAML files ensure text accuracy and quality
- 🎨 AI Images: Generate themed images with DALL-E 3
- 🎵 Audio Pronunciation: Full and slow-speed audio with ElevenLabs
- 🔍 Semantic Search: Vector embeddings for intelligent verse discovery
- 📚 Multi-Collection: Organized support for multiple verse collections
- 🎨 Theme System: Customizable visual styles (modern, traditional, kids-friendly, etc.)
Quick Start
New Project Setup (Recommended)
# 1. Install
pip install sanatan-sdk
# 2. Create project with collection templates
verse-init --project-name my-verse-project --collection hanuman-chalisa
cd my-verse-project
# 3. Configure API keys
cp .env.example .env
# Edit .env and add your API keys from:
# - OpenAI: https://platform.openai.com/api-keys
# - ElevenLabs: https://elevenlabs.io/app/settings/api-keys
# 4. Add canonical Devanagari text
# Edit data/verses/hanuman-chalisa.yaml with actual verse text
# 5. Validate setup
verse-validate
# 6. Generate multimedia content
verse-generate --collection hanuman-chalisa --verse 1
What you get: Verse file, AI-generated image, audio (full + slow speed), and search embeddings!
Existing Project
# Validate and fix structure
verse-validate --fix
# Generate content
verse-generate --collection hanuman-chalisa --verse 15
# Check status
verse-status --collection hanuman-chalisa
Advanced Usage
# Multiple collections at once
verse-init --collection hanuman-chalisa --collection sundar-kaand
# Custom number of sample verses
verse-init --collection my-collection --num-verses 10
# Generate specific components only
verse-generate --collection sundar-kaand --verse 3 --image
verse-generate --collection sundar-kaand --verse 3 --audio
# Skip embeddings update (faster)
verse-generate --collection hanuman-chalisa --verse 15 --no-update-embeddings
What Gets Generated
Each verse generation creates:
- 🎨 Image:
images/{collection}/{theme}/verse-01.png(DALL-E 3) - 🎵 Audio (full):
audio/{collection}/verse-01-full.mp3(ElevenLabs) - 🎵 Audio (slow):
audio/{collection}/verse-01-slow.mp3(0.75x speed) - 🔍 Embeddings:
data/embeddings.json(for semantic search)
Text Source: Canonical Devanagari text from data/verses/{collection}.yaml (Local Verses Guide)
Installation
pip install sanatan-sdk
Commands
Project Setup
- verse-init - Initialize new project with recommended structure
- verse-validate - Validate project structure and configuration
Content Generation
- verse-generate - Complete orchestrator for verse content (text fetching, multimedia generation, embeddings)
- verse-translate - Translate verses into multiple languages (Hindi, Spanish, French, etc.)
- verse-images - Generate images using DALL-E 3
- verse-audio - Generate audio pronunciations using ElevenLabs
- verse-embeddings - Generate vector embeddings for semantic search (multi-collection guide)
Project Management
- verse-status - Check status, completion, and validate text against canonical source
- verse-sync - Sync verse text with canonical source (fix mismatches)
- verse-deploy - Deploy Cloudflare Worker for API proxy
Configuration
Copy the example environment file and add your API keys:
cp .env.example .env
# Edit .env and add your API keys
See the Usage Guide for detailed information on project structure, workflows, batch processing, and cost optimization.
Documentation
- Usage Guide - Project setup, workflows, batch processing, and best practices
- Local Verses Guide - Using local YAML files for verse text
- Command Reference - Detailed documentation for all commands
- Development Guide - Setup and contributing to verse-sdk
- Troubleshooting - Common issues and solutions
- Multi-Collection Guide - Working with multiple collections
- Publishing Guide - For maintainers
Example Project
Hanuman GPT - Multi-collection project with Hanuman Chalisa, Sundar Kaand, and Sankat Mochan Hanumanashtak
Requirements
- Python 3.8+
- OpenAI API key (for text/images/embeddings)
- ElevenLabs API key (for audio)
License
MIT License - See LICENSE file for details
Support
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
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 sanatan_sdk-0.25.2.tar.gz.
File metadata
- Download URL: sanatan_sdk-0.25.2.tar.gz
- Upload date:
- Size: 85.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be42a4b0550efc7cb5808ce5b49cc3d564d676963cc8b2b2aa086aafb2b61ca2
|
|
| MD5 |
1d7660f5bdd38f349cc9f36f4847db5a
|
|
| BLAKE2b-256 |
a5f6ea036b83979bea044beb194a241b41757eb741d80894db6df0c7cbee327e
|
File details
Details for the file sanatan_sdk-0.25.2-py3-none-any.whl.
File metadata
- Download URL: sanatan_sdk-0.25.2-py3-none-any.whl
- Upload date:
- Size: 100.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43862b542fa596f97d67974f5d9f33ef5ff0b0214e680d91030b362c93e9df53
|
|
| MD5 |
703dd2d9cef7f03298c6487a804af667
|
|
| BLAKE2b-256 |
ddc95c561fbd445b6f6c4008966ac18b127b61e8443a0e4465fdb594d8e3732f
|