Postgrest_py and supabase_py
# off-topic
u
Postgrest_py and supabase_py
The convo bout PYTHON
@User and @User here we have it for 3 days
really need a channel for these two ig
s
If any of you are python devs, you can contribute where possible
u
Sure
tbh updating the documentation would be great stuff and I'll try my best to figure it out
ig this thread will never close
3 days of inactivity now way
o
As long as those bugs exist, no 😛
u
yea lol
o
I'd suggest we use postgrest-py so we can test what methods work and what's the correct code snippet, because it seems the one in the README is wrong
u
mhm
o
Then we try with supabase-py and figure out why it fails on correct commands
u
sure thats a good idea I suppose
ig we're a team now lol
a
Sorry, what's an "ig"
u
I guess
a
Oh, haha. I'm bad with abbreviations.
u
@User
ok now we have our bot
when you spend few month in discord, you'll become a PRO in abbr
Postgrest_py and Supabase_py Modules Testing and Support
hehe
o
Reading and inserting data works
But it fails when trying to use a filter, which should be used with a delete or update method, for example
Copy code
Python
supabase.table("events").select("*").eq("id", "2").execute()
does work, though
u
mhm
o
So I assume eq was defined when you select data
u
ok
o
but not for the rest of queries
u
yea also ig we cant are need to find a way for editing a pre-existing data
ANy Updates today? @User
!ping
bruh
o
Nope, I've been busy with work
u
oh ok
me and mee6 flexing
@User Does it wraps Gotrue_py instead of Postgrest_py?
o
no it wraps postgrest
gotrue and realtime too
u
oh
we need to dig and find the errors
and make the documentation for python
a
Just a heads-up. If there are errors, you can create an issue on Github about it. If there isn't any errors, you can either optimize the existing functions, or implement new functions that you need to suit your development environment. @User
That would make it easier for you and other maintainers.
o
We did create an issue, but we're trying to dig more into the project 🙂
a
Do you guys need any help on that?
u
Copy code
py
Traceback (most recent call last):
  File "main.py", line 11, in <module>
    db.from_("repl").delete().eq("IQ","74").execute()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/supabase_py/lib/query_builder.py", line 33, in _execute_monkey_patch
    "data": response.json(),
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ofc yes
o
Yes, Python isn't exactly my skill 😆
hmm yeah that's from supabase-py
a
I'll take a look into it and see if I can help with that, since Python isn't my profession too.
u
hmm
or thats it?
u
mhm
m
Thoughts?
u
nohting tbh
any improvements?