Skip to content

Update README with the new API #139

@nikeshnaik

Description

@nikeshnaik

Describe the bug
In the ReadMe.md file, the examples shown for inserting data, selecting data from the countries table returns class object, an assertion on that object to get data is throwing error. Is doc outdated?

To Reproduce
Steps to reproduce the behaviour:
Run the examples shown in ReadMe.md

assert len(data.get("data", [])) > 0 AttributeError: 'APIResponse' object has no attribute 'get'

Expected behaviour
`supabase: Client = create_client(url, key)
data = supabase.table("countries").select("*").execute()
Assert we pulled real data.
assert len(data.get("data", [])) > 0 ----> Throwing error

supabase: Client = create_client(url, key)
data = supabase.table("countries").select("*").execute()
Assert we pulled real data.
assert len(data.data) > 0` --> This fixes it, shall I update remaining examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions