Python: Insert data

Parameters

Examples

Create a record

response = (
    supabase.table("countries")
    .insert(\{"id": 1, "name": "Denmark"\})
    .execute()
)

Bulk create

try:
  response = supabase.table("countries")
    .insert([
      \{ "id": 1, "name": "Nepal" \},
      \{ "id": 1, "name": "Vietnam" \},
    ])
    .execute()
  return response
except Exception as exception:
  return exception