This folder contains:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
.envcp .env.example .env
Edit .env and set DATABASE_URL.
By default the importer is data-only. Do not pass --include-non-data.
Recommended first run (applies schema + clears existing sheet_records + imports + verifies):
python3 diamond_research_phase2_import.py --apply-schema --replace --with-row-meta --smoke-check
Start the FastAPI server:
.venv/bin/uvicorn api_main:app --host 127.0.0.1 --port 8000 --reload
Or simply:
.venv/bin/python api_main.py
/sheets – List all sheets/sheets/{sheet_id}/columns – Get column definitions for a sheet/sheets/{sheet_id}/records – Paginated records for a sheet (query params: page, page_size)/sheets/{sheet_id}/search – Full-text search within a sheet (query params: q, page, page_size)/health – Health checkOpen http://127.0.0.1:8000/docs for Swagger UI.
python3 diamond_research_phase2_import.py --apply-schema --replace --with-row-meta --smoke-check --sheets "Sheet1,Sheet2"
--replace.The importer defaults to these files in the same folder:
vedic_jyotish_advanced (7).xlsxdiamond_research_excel_analysis_v2.jsondiamond_research_phase1_postgres_schema.sql.env (with DATABASE_URL)