Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix Python code and update docs with responses (#25852)

Mrinank Bhowmick687c6e3d4309
diff --git a/apps/docs/spec/supabase_py_v2.yml b/apps/docs/spec/supabase_py_v2.yml
index b4e1f760892..09af232cddd 100644
--- a/apps/docs/spec/supabase_py_v2.yml
+++ b/apps/docs/spec/supabase_py_v2.yml
@@ -70,10 +70,61 @@ functions:
name: Sign up
code: |
```
- res = supabase.auth.sign_up(
- email= '[email protected]',
- password= 'example-password',
- )
+ credentials = {
+ "email": "[email protected]",
+ "password": "users_password"
+ }
+ user = supabase.auth.sign_up(credentials)
+ ```
+ response: |
+ ```
+ User(
+ id='11111111-1111-1111-1111-111111111111',
+ app_metadata={
+ 'provider': 'email',
+ 'providers': ['email']
+ },
+ user_metadata={
+ 'email': '[email protected]',
+ 'email_verified': False,
+ 'phone_verified': False,
+ 'sub': '11111111-1111-1111-1111-111111111111'
+ },
+ aud='authenticated',
+ confirmation_sent_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC)),
+ recovery_sent_at=None,
+ email_change_sent_at=None,
+ new_email=None,
+ invited_at=None,
+ action_link=None,
+ email='[email protected]',
+ phone='',
+ created_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC)),
+ confirmed_at=None,
+ email_confirmed_at=None,
+ phone_confirmed_at=None,
+ last_sign_in_at=None,
+ role='authenticated',
+ updated_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC)),
+ identities=[
+ UserIdentity(
+ id='22222222-2222-2222-2222-222222222222',
+ user_id='11111111-1111-1111-1111-111111111111',
+ identity_data={
+ 'email': '[email protected]',
+ 'email_verified': False,
+ 'phone_verified': False,
+ 'sub': '11111111-1111-1111-1111-111111111111'
+ },
+ provider='email',
+ created_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC)),
+ last_sign_in_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC)),
+ updated_at=datetime.datetime(2024, 1, 1, 1, 0, 0, 0, tzinfo=TzInfo(UTC))
+ )
+ ],
+ factors=None
+ )
+ session=None
```
- id: sign-up-with-additional-user-metadata
name: Sign up with additional user metadata