-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate_sandbox_db.py
More file actions
43 lines (33 loc) · 1.27 KB
/
Copy pathcreate_sandbox_db.py
File metadata and controls
43 lines (33 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python3
"""
KUYAN - Sandbox Database Creator
Create a sandbox database with sample data for KUYAN
This database will be used for the /sandbox URL
Copyright (c) 2025 mycloudcondo inc.
Licensed under MIT License - see LICENSE file for details
"""
import os
import sys
from pathlib import Path
# Add parent directory to path to import database module
sys.path.insert(0, str(Path(__file__).parent))
from database import Database
SANDBOX_DB = "kuyan-sandbox.db"
def create_sandbox_database():
"""Create a fresh sandbox database with sample data"""
# Remove existing sandbox database if it exists
if os.path.exists(SANDBOX_DB):
os.remove(SANDBOX_DB)
print(f"Removed existing {SANDBOX_DB}")
# Create new database and seed with sample data
print(f"Creating {SANDBOX_DB}...")
db = Database(db_path=SANDBOX_DB)
print("Seeding sample data...")
db.seed_sample_data()
print(f"✅ Sandbox database created successfully: {SANDBOX_DB}")
print(f" - 2 owners (Me, Wife)")
print(f" - 4 accounts")
print(f" - 24 months of realistic snapshots (Jan of previous year + 24 months)")
print(f" - Includes seasonal patterns, market volatility, and realistic variations")
if __name__ == "__main__":
create_sandbox_database()