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

    John Phamous

    10/05/2021, 9:33 PM
    Got it working! I'll share a code diff for the client code in a bit 🙂
  • j

    John Phamous

    10/05/2021, 9:39 PM
    Copy code
    python
        multipart_data = MultipartEncoder(
            fields={
                "file": (
                    "party-parrot.gif",
                    open("./out/party-parrot.gif", 'rb'),
                    "image/gif"
                )
            })
    
        formHeaders = {
            "Content-Type": multipart_data.content_type,
        }
    
        headers = dict(supabase._get_auth_headers(), **formHeaders)
        response = requests.post(
            url=request_url,
            headers=headers,
            data=multipart_data,
        )
  • j

    John Phamous

    10/05/2021, 9:39 PM
    The file being updated needs the mime type along with the request
  • j

    J0

    10/05/2021, 11:15 PM
    Hey nope
  • j

    J0

    10/05/2021, 11:15 PM
    thanks for the fix!
  • j

    J0

    10/09/2021, 11:51 PM
    Hey @User Thanks for this fix! Could we trouble you for your Twitter/Github handle? Would like to credit you when we announce the release 🙂
  • j

    John Phamous

    10/10/2021, 12:20 AM
    @JohnPhamous
  • j

    J0

    10/10/2021, 12:30 AM
    cool, thanks!
  • t

    Tito

    10/11/2021, 1:06 PM
    Hey John! same issue here with images! Glad to see that you could handle it! Could you share the code diff for the client? Thanks!
  • j

    John Phamous

    10/11/2021, 3:23 PM
    https://discord.com/channels/839993398554656828/877214541472202762/895062565388968007
  • t

    Tito

    10/11/2021, 4:51 PM
    Thanks I just managed to reproduce it.
  • a

    anand

    10/12/2021, 4:32 PM
    why's pytest part of the package dependencies? shouldn't it be a dev-dependency? 🤔
  • j

    J0

    10/12/2021, 5:41 PM
    yep, good catch. It should be a dev dependency
  • j

    J0

    10/12/2021, 5:41 PM
    feel free to file a PR
  • d

    Deleted User

    10/13/2021, 1:20 AM
    Hi, if there is any maintainer of the gotrue package for Python could you give me feedback on this PR? https://github.com/supabase-community/gotrue-py/pull/19 I want to work on other Issues but starting from that PR.
  • j

    J0

    10/13/2021, 4:04 AM
    yeah
  • j

    J0

    10/13/2021, 4:04 AM
    I'll take a look
  • j

    J0

    10/13/2021, 4:05 AM
    thanks for the PR!
  • a

    anand

    10/13/2021, 4:07 AM
    I've made the PR for moving pytest to dev deps
  • a

    anand

    10/13/2021, 4:07 AM
    Is there a contributing guide somewhere?
  • j

    J0

    10/13/2021, 4:11 AM
    Thanks! You can find the contributing guide here: https://github.com/supabase-community/supabase-py/blob/develop/CONTRIBUTING.md
  • a

    anand

    10/13/2021, 4:16 AM
    what's going on with sync/async support rn? I see that supabase-py is mostly sync now and using requests, but postgrest-py is async with httpx?
  • j

    J0

    10/13/2021, 4:18 AM
    There are plans to support async using httpx but we have yet to get around to implementing it. PRs are very much welcome!
  • a

    anand

    10/13/2021, 4:24 AM
    cool 😄
  • a

    anand

    10/13/2021, 4:29 AM
    Will I have to make an issue first?
  • a

    anand

    10/13/2021, 4:29 AM
    I was thinking I could try with supabase/lib/storage/storage_bucket_api.py
  • a

    anand

    10/13/2021, 4:29 AM
    or both of the storage bucket + storage file APIs
  • j

    J0

    10/13/2021, 4:45 AM
    feel free to create an issue if you'd like but don't feel obligated to
  • j

    J0

    10/13/2021, 4:45 AM
    yeah
    storage_bucket_api
    could be a good starting point
  • j

    J0

    10/13/2021, 4:49 AM
    I believe leynier may have created an issue for this
12345...19Latest