SDK for generating rich multimedia content for verse-based texts
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: Fetch text, generate media, and update embeddings - all in one command
- 📖 Text Sources: Read from local YAML files or fetch from authoritative online sources
- 🎨 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
# Install
pip install sanatan-sdk
# Set up API keys (in your project directory)
cp .env.example .env
# Edit .env and add your API keys
# List available collections
verse-generate --list-collections
# Complete workflow (default) - fetch text, generate media, update embeddings
verse-generate --collection hanuman-chalisa --verse 15
# Skip text fetching (when verse text already exists)
verse-generate --collection sundar-kaand --verse 5 --no-fetch-text
# Or generate specific components only
verse-generate --collection sundar-kaand --verse 3 --image
verse-generate --collection sankat-mochan-hanumanashtak --verse 5 --audio
By default, the complete workflow includes:
- 🔍 Fetch traditional Devanagari text (from local YAML files or web sources)
- 🎨 DALL-E 3 generated image (saved to
images/{collection}/{theme}/) - 🎵 Full-speed pronunciation (saved to
audio/{collection}/{verse}_full.mp3) - 🎵 Slow-speed pronunciation (saved to
audio/{collection}/{verse}_slow.mp3) - 🔗 Update vector embeddings for semantic search
Text Sources (checked in order):
- Local YAML file:
data/verses/{collection}.yamlor.yml(recommended) - Web scraping from authoritative sources (fallback)
Opt-out flags (to skip specific steps):
--no-fetch-text- Skip fetching text (use when verse text already exists)--no-update-embeddings- Skip updating embeddings
Installation
pip install sanatan-sdk
Commands
- verse-generate - Complete orchestrator for verse content (text fetching, multimedia generation, embeddings)
- verse-status - Check status, completion, and validate text against canonical source
- verse-sync - Sync verse text with canonical source (fix mismatches)
- verse-fetch-text - Fetch traditional Devanagari text from authoritative sources
- 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)
- 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.7.2.tar.gz.
File metadata
- Download URL: sanatan_sdk-0.7.2.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb58614ae0dc10f023f06c55ee6bc6523a876863de81aefa93322021a2044080
|
|
| MD5 |
40e27a86fd9c1ed992d1f22fb8ec9b3d
|
|
| BLAKE2b-256 |
1e13bb40d3ba86ab0fbde8d6957d79d00cfa96111d7e20ab77d239a5163fda86
|
File details
Details for the file sanatan_sdk-0.7.2-py3-none-any.whl.
File metadata
- Download URL: sanatan_sdk-0.7.2-py3-none-any.whl
- Upload date:
- Size: 50.2 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 |
6cdc3da8b97f04887e3cfd1247740541bc5cddbda0115c22b1d2fe3dc471de44
|
|
| MD5 |
1af82a471c8ee872adc73cdad1f6f5f7
|
|
| BLAKE2b-256 |
8a3831b60be58381e961a48dcec43449190495273d443b410442a9a1d638e7f2
|