From 697b34deb3fb07ab6607839898938e105f7eabf7 Mon Sep 17 00:00:00 2001 From: Alif Ayatulloh Ar-Rizqy <45624651+alif-arrizqy@users.noreply.github.com> Date: Thu, 6 Jan 2022 10:24:34 +0700 Subject: [PATCH] Update README.md Add update of data --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 9153e3db..09846326 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,17 @@ data = supabase.table("countries").select("*").execute() assert len(data.get("data", [])) > 0 ``` +#### Update of Data + +```python +from supabase import create_client, Client + +url: str = os.environ.get("SUPABASE_TEST_URL") +key: str = os.environ.get("SUPABASE_TEST_KEY") +supabase: Client = create_client(url, key) +data = supabase.table("countries").update({"country": "Indonesia", "capital_city": "Jakarta"}).eq("id", "1").execute() +``` + ## Realtime Changes ```python