https://supabase.com/ logo
Join Discord
Powered by
# python
  • d

    dreinon

    01/13/2022, 9:51 AM
    Are you using vs-code?
  • j

    jaf

    01/13/2022, 1:10 PM
    I'm not sure, first time I'm dabbling with python. I'm using pycharm community edition
  • d

    dreinon

    01/13/2022, 7:44 PM
    Look at the definition of execute, and then add a timeout parameter to
    self.session.request
    and set it to whatever integer you want it (default is 5 secs so probability a bit more)
  • d

    dreinon

    01/13/2022, 7:47 PM
    That should do the job, but make suro you don't upgrade supabase or postgrest, otherwise you'll have to make the change again
  • l

    leynier

    01/13/2022, 7:58 PM
    Today I will make a PR for this and the temporal fix to the bug of httpx with multipart files.
  • m

    magpow

    01/14/2022, 4:25 PM
    The two other articles are also live. Will read them over the weekend. https://aunicorndev.hashnode.dev/supa-fast-api-supabase-fastapi-building-the-api https://aunicorndev.hashnode.dev/supa-fast-api-supabase-fastapi-deploying-on-deta
  • l

    leynier

    01/15/2022, 8:29 AM
    Hi everyone, a new version (
    v0.3.5
    ) of
    gotrue-py
    with bug fixing was released. https://github.com/supabase-community/gotrue-py/releases/tag/v0.3.5
  • l

    leynier

    01/17/2022, 6:21 AM
    Hi everyone, a new version (
    v0.4.0
    ) of
    gotrue-py
    has been released with Notion as a new OAuth provider. Thanks to the contributors who implemented the server-side 👏🏼 https://github.com/supabase-community/gotrue-py/releases/tag/v0.4.0
  • l

    leynier

    01/17/2022, 2:10 PM
    Hi everyone, new versions of the Python Community Supabase client libraries 🐍 🧑‍🤝‍🧑 have been released: - **supabase-py**(
    v0.3.0
    ): - fix: use
    requests
    for upload meanwhile (https://github.com/encode/httpx/discussions/2004) - deps: upgrade
    postgrest-py
    ,
    gotrue-py
    and others dependencies - **chore**: improve
    ci-cd
    pipeline - **postgrest-py**(
    v0.8.0
    ): - **feat**: add
    timeout
    as a parameter of clients - **fix**: incorrect behavior in
    sanitize_param
    method - **deps**: upgrade dependencies - **chore**: improve
    ci-cd
    pipeline - **gotrue-py**(
    v0.4.0
    ): - **feat**: add
    notion
    as a new oauth provider - **fix**:
    delete_user
    method of api layer - **deps**: upgrade dependencies - **chore**: improve
    ci-cd
    pipeline
  • l

    leynier

    01/22/2022, 8:36 AM
    Hi everyone, new versions of the Python Community Supabase client libraries 🐍 🧑‍🤝‍🧑 have been released. This time it was
    supabase-py: v0.3.2
    and
    postgrest-py: v0.8.1
    with a bug fix that prevented the order filter from being applied.
  • t

    ThePhilip

    01/26/2022, 2:13 AM
    Does supabase py have upsert?
  • b

    Baker XBL

    01/26/2022, 4:52 AM
    since it's based on postgres, you'll probably need to use
    on conflict
  • p

    Phil

    01/27/2022, 7:44 AM
    Hi, I've been using this if-statement to check if the request was successful, but it looks like the Status-Code field is missing in the new Library Updates. Has anyone else encountered this issue?
    Copy code
    py
    if response['status_code'] == 201:
        # do smth with the data
    else:
        # throw error
  • a

    anand

    01/28/2022, 1:56 PM
    there's a PR open that should raise the error for you (if there are any), this should be effectively fixed then
  • a

    anand

    01/28/2022, 6:06 PM
    ^ has been merged
  • d

    dreinon

    02/04/2022, 4:43 PM
    Hi! We finally released new versions of postgrest-py and supabase-py that implements a couple of breaking changes! Now, an APIError Exception will be raised instead of returning the former error dict! Also, we implemented a Response model with two properties, data and count instead of the former tuple, so the execute method will return an instance of this model 😃 🐍
  • b

    brady

    02/09/2022, 5:21 AM
    Is ignore_duplicates not fully implemented? When I am trying to batch upsert and set ignore_duplicates to true, it is saying there is a duplicate and not upserting any of the records.
  • b

    brady

    02/09/2022, 5:21 AM
    I could also be using it wrong
  • u

    user

    02/21/2022, 11:52 PM
    hi, i am trying to save discord channel id's into int8 like so
    Copy code
    python
    supabase.table('guildsettings').update({"invite_channel_id": channel_id}).eq("guild_id", guild_id).execute()
    but the last number of saved int8 is always
    0
    . I don't see it in open issues, but I want to make sure that I'm doing everything as i should
  • u

    user

    02/21/2022, 11:53 PM
    *last digit
  • p

    pocin

    02/22/2022, 10:15 AM
    discord id is a 64bit "number" (actually a snowflake type) so it's represented as a string (at least in javascript). int8 is signed so thats the one bit you are most likely missing
  • p

    pocin

    02/23/2022, 8:21 AM
    Was it the sign bit in the end? 😄 I know this is python not js. I used js to illustrate the point of overflows (53bit numbers in js overflow for 64bit discord ids)
  • l

    leynier

    03/12/2022, 11:19 PM
    Hi folks: I have a proposal for a new query API for
    postgrest-py
    . The objective is to be more strict with respect to the order in that the different methods can be chained like the SQL statements keeping the full type annotation. I made a pull request with the proposal, please, react on pull request with a 👍 if you like it and with a 👎 if you don't like it. Greetings. https://github.com/supabase-community/postgrest-py/pull/102
  • y

    YashDawani

    03/16/2022, 2:56 AM
    Hi Everyone, Newbie here to Supabase-py. Hopefully, someone could help me with a query. Is it possible to create tables on supabase using the supabase python client
  • l

    leynier

    03/16/2022, 3:09 AM
    You should be able to create tables using remote procedure calls to postgrest functions 🤔 Although you should be careful with security
  • g

    Garberchov

    03/27/2022, 6:12 PM
    Hey guys, I am using the python library and am getting the error
    TypeError: __init__() got an unexpected keyword argument 'headers'
    when I try and make the client.
    supabase = create_client(supabaseUrl, supabaseKey)
    If anybody knows why this is happening help would be awesome
  • w

    willm

    04/18/2022, 6:43 AM
    I'm having an odd problem with supabase python. When running simple operations with a newly created client, I get the following error:
    Copy code
    httpx.ConnectError: [Errno -2] Name or service not known
    Can anyone help me solve this?
  • w

    willm

    04/18/2022, 6:44 AM
    all I'm running is this
  • w

    willm

    04/18/2022, 6:44 AM
    Copy code
    py
    
    url: str | None = os.getenv("SUPABASE_URL")
    key: str | None = os.getenv("SUPABASE_KEY")
    print(url, key)
    if not url or not key:
        raise Exception("Missing SUPABASE_URL or SUPABASE_KEY")
    supabase: Client = create_client(url, key)
    
    print(supabase.table("table").select("*").execute())
  • s

    Studywithdesign

    04/18/2022, 9:36 AM
    can i use supabase for bringing data in python and then do machine learning and then make an api
1...131415...19Latest