config module provides functions to access configuration values from config.json and environment variables.
Constants
Root directory of the application, calculated as
os.path.dirname(sys.path[0])Folder Structure
assert_folder_structure
Ensures the necessary folder structure exists.None - Creates .mp folder if it doesn’t exist
Example
get_first_time_running
Checks if the program is running for the first time.bool - True if .mp folder doesn’t exist, False otherwise
Example
General Configuration
get_verbose
Gets the verbose flag from the config file.bool - Verbose logging flag
Example
get_headless
Gets the headless browser flag from the config file.bool - Headless mode flag for browser automation
get_firefox_profile_path
Gets the path to the Firefox profile.str - Path to the Firefox profile directory
get_threads
Gets the number of threads to use for operations like MoviePy.int - Number of threads to use
Email Configuration
get_email_credentials
Gets email credentials from the config file.dict - Email credentials dictionary
LLM Configuration
get_ollama_base_url
Gets the Ollama server base URL.str - Ollama base URL (defaults to http://127.0.0.1:11434)
Example
get_ollama_model
Gets the Ollama model name from the config file.str - Ollama model name, or empty string if not configured
Example
Image Generation (Nano Banana 2)
get_nanobanana2_api_base_url
Gets the Nano Banana 2 (Gemini image) API base URL.str - API base URL (defaults to https://generativelanguage.googleapis.com/v1beta)
get_nanobanana2_api_key
Gets the Nano Banana 2 API key from config or environment.str - API key from config file or GEMINI_API_KEY environment variable
Example
get_nanobanana2_model
Gets the Nano Banana 2 model name.str - Model name (defaults to gemini-3.1-flash-image-preview)
get_nanobanana2_aspect_ratio
Gets the aspect ratio for image generation.str - Aspect ratio (defaults to 9:16)
Speech-to-Text Configuration
get_assemblyai_api_key
Gets the AssemblyAI API key.str - AssemblyAI API key
get_stt_provider
Gets the configured speech-to-text provider.str - STT provider (defaults to local_whisper)
get_whisper_model
Gets the local Whisper model name.str - Whisper model name (defaults to base)
get_whisper_device
Gets the target device for Whisper inference.str - Device for Whisper (defaults to auto)
get_whisper_compute_type
Gets the compute type for Whisper inference.str - Compute type (defaults to int8)
Text-to-Speech Configuration
get_tts_voice
Gets the TTS voice from the config file.str - TTS voice name (defaults to Jasper)
Social Media Configuration
get_twitter_language
Gets the Twitter language setting.str - Twitter language code
get_is_for_kids
Gets the YouTube “made for kids” flag.bool - Whether content is marked as made for kids
Scraper Configuration
get_scraper_timeout
Gets the timeout for web scraping operations.int - Timeout in seconds (defaults to 300)
get_google_maps_scraper_zip_url
Gets the URL to the Google Maps scraper zip file.str - URL to the scraper zip file
get_google_maps_scraper_niche
Gets the niche for Google Maps scraping.str - Scraper niche/category
Outreach Configuration
get_outreach_message_subject
Gets the outreach email subject line.str - Email subject line
get_outreach_message_body_file
Gets the path to the outreach message body file.str - Path to the message body template file
Video Configuration
get_zip_url
Gets the URL to the zip file containing background songs.str - URL to the songs zip file
get_font
Gets the font name from the config file.str - Font name for video subtitles
get_fonts_dir
Gets the fonts directory path.str - Path to the fonts directory
get_imagemagick_path
Gets the path to ImageMagick binary.str - Path to ImageMagick executable
get_script_sentence_length
Gets the forced script sentence length for video generation.int - Sentence length (defaults to 4 if not configured)
Subtitle Utilities
equalize_subtitles
Equalizes subtitles in an SRT file by limiting characters per line.Path to the SRT subtitle file
Maximum characters per subtitle line
None - Modifies the SRT file in place
Example