BACK TO CLAUDE SKILLS
◈
cache_to_supabase
Data PipelineDatabaseSupabase
INSTALLATION
$python -c "exec(open('cache_to_supabase.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]
Upserts a list of analysis result dictionaries to the `coin_analysis` Supabase table using the Python Supabase client. The `on_conflict="coin_id"` parameter ensures that re-running analysis for a coin updates the existing record rather than inserting a duplicate. Environment variables are read at call time rather than module load time.
For batch upserts, Supabase accepts the full list in a single request — no looping required. This is orders of magnitude faster than individual row inserts when caching 100 coins simultaneously. Ensure the list dictionaries contain only columns that exist in the database schema to avoid foreign key or type mismatch errors.
[ USAGE EXAMPLE ]
[ FULL CODE ]
[ METADATA ]
CategoryData Pipeline
ComplexityIntermediate
LanguagePython 3.10+
TagsDatabase, Supabase
[ ASK CLAUDE ]
Ask AI about this skill before installing it.