Skip to main content

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

# 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:

  • 🔍 Read canonical Devanagari text from local YAML files
  • 🎨 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 Source:

  • Local YAML file: data/verses/{collection}.yaml or .yml (required)
  • You must create this file with canonical verse text (see Local Verses Guide)

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

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sanatan_sdk-0.20.3.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

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

sanatan_sdk-0.20.3-py3-none-any.whl (72.9 kB view details)

Uploaded Python 3

File details

Details for the file sanatan_sdk-0.20.3.tar.gz.

File metadata

  • Download URL: sanatan_sdk-0.20.3.tar.gz
  • Upload date:
  • Size: 60.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sanatan_sdk-0.20.3.tar.gz
Algorithm Hash digest
SHA256 ccc3a8ed8a6a9e6ded28775e4172eeaade8d4d0bdc748e1fd81adc4d395e1657
MD5 d9979fcdb6c70f4b0c1821703ac615c7
BLAKE2b-256 ba52bd691fb58c91e43cc7e1032ce47ed9b82beb05ed5e88ee502f8b02a57716

See more details on using hashes here.

File details

Details for the file sanatan_sdk-0.20.3-py3-none-any.whl.

File metadata

  • Download URL: sanatan_sdk-0.20.3-py3-none-any.whl
  • Upload date:
  • Size: 72.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sanatan_sdk-0.20.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a5617856f95728013965fccc9bbc8eb54e990d4aecc4a9f2e95cdf3fa1306e8b
MD5 f38f2f0566b1f6c8c29354c8568273c9
BLAKE2b-256 4f134621ce65f33cf751ca66c5d5d402f9ace7c770a99dc1a90a2eb748579265

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