Download scripts/init_neon_schema.py from danishk84/NovaGuide: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/spaces/danishk84/NovaGuide/resolve/main/scripts/init_neon_schema.py
- Command line
-
hf download hf://spaces/danishk84/NovaGuide/scripts/init_neon_schema.py
-
curl -L -o init_neon_schema.py https://huggingface.co/spaces/danishk84/NovaGuide/resolve/main/scripts/init_neon_schema.py
584 Bytes
| """Initialize the optional Neon analytics schema.""" | |
| import sys | |
| from pathlib import Path | |
| ROOT=Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path:sys.path.insert(0,str(ROOT)) | |
| from src.logging_layer.neon_client import NeonClient # noqa:E402 | |
| def main()->int: | |
| client=NeonClient() | |
| if not client.is_configured():print("Neon is not configured. Set the DATABASE_URL secret.");return 0 | |
| ok=client.execute_schema();print("Neon schema initialized." if ok else "Neon schema initialization failed.");return 0 if ok else 1 | |
| if __name__=="__main__":raise SystemExit(main()) | |