zerodb-supabase 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AINative Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: zerodb-supabase
3
+ Version: 0.1.0
4
+ Summary: Drop-in Supabase Python client replacement backed by ZeroDB. Same API, free cloud database.
5
+ Author-email: AINative Studio <dev@ainative.studio>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/AINative-Studio/zerodb-supabase
8
+ Project-URL: Documentation, https://docs.ainative.studio
9
+ Project-URL: Repository, https://github.com/AINative-Studio/zerodb-supabase
10
+ Project-URL: Issues, https://github.com/AINative-Studio/zerodb-supabase/issues
11
+ Keywords: supabase,supabase-alternative,supabase-py,supabase-python,supabase-client,database,postgres,rest-api,zerodb,ainative,baas,backend-as-a-service,storage,file-storage,s3-compatible,edge-functions,serverless-functions,realtime,vector-database,embeddings,ai-database,free-database,firebase-alternative,neon-alternative,planetscale-alternative,mcp,claude,cursor
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Database
22
+ Classifier: Topic :: Internet :: WWW/HTTP
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: requests>=2.28
28
+ Dynamic: license-file
29
+
30
+ # zerodb-supabase
31
+
32
+ **Drop-in replacement for [supabase-py](https://pypi.org/project/supabase/) backed by ZeroDB.**
33
+
34
+ Same API. Free cloud database. No Supabase account needed.
35
+
36
+ [![PyPI](https://img.shields.io/pypi/v/zerodb-supabase)](https://pypi.org/project/zerodb-supabase/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
+
39
+ ## Why switch?
40
+
41
+ | | supabase-py | zerodb-supabase |
42
+ |---|---|---|
43
+ | **Database** | Supabase Cloud (paid after free tier) | ZeroDB (free tier) |
44
+ | **Storage** | Supabase Storage (limited) | ZeroDB S3-compatible (generous) |
45
+ | **Functions** | Edge Functions (Deno only) | ZeroDB Functions (Python, JS, TS) |
46
+ | **Provisioning** | Manual dashboard setup | Auto-provision on first use |
47
+ | **Vectors** | pgvector extension | Built-in vector search |
48
+ | **AI Memory** | Not available | ZeroMemory cognitive memory |
49
+ | **License** | Apache-2.0 | MIT |
50
+
51
+ ## Installation
52
+
53
+ ```bash
54
+ pip install zerodb-supabase
55
+ ```
56
+
57
+ ## Migration (30 seconds)
58
+
59
+ Change one import:
60
+
61
+ ```python
62
+ # Before
63
+ from supabase import create_client
64
+
65
+ # After
66
+ from zerodb_supabase import create_client
67
+ ```
68
+
69
+ That's it. Every method works the same.
70
+
71
+ ## Quick Start
72
+
73
+ ```python
74
+ from zerodb_supabase import create_client
75
+
76
+ # Auto-provisions a free ZeroDB project on first use
77
+ client = create_client()
78
+
79
+ # Query data
80
+ data = client.table('users').select('*').eq('active', True).execute()
81
+ print(data.data) # [{'id': 1, 'name': 'Alice', 'active': True}, ...]
82
+
83
+ # Insert data
84
+ client.table('users').insert({
85
+ 'name': 'Alice',
86
+ 'email': 'alice@example.com'
87
+ }).execute()
88
+
89
+ # Update data
90
+ client.table('users').update({
91
+ 'name': 'Alice Updated'
92
+ }).eq('id', 1).execute()
93
+
94
+ # Delete data
95
+ client.table('users').delete().eq('id', 1).execute()
96
+
97
+ # Storage (S3-compatible)
98
+ client.storage.from_('avatars').upload('avatar.png', open('avatar.png', 'rb'))
99
+ url = client.storage.from_('avatars').get_public_url('avatar.png')
100
+
101
+ # Functions (ZeroDB Functions)
102
+ result = client.functions.invoke('process-upload', {'file_id': '123'})
103
+ print(result.data)
104
+ ```
105
+
106
+ ## API Reference
107
+
108
+ ### `create_client(supabase_url=None, supabase_key=None, **kwargs)`
109
+
110
+ Create a client. Credentials resolved in order:
111
+ 1. Constructor arguments (`api_key`, `project_id`)
112
+ 2. Supabase-compatible args (`supabase_key` used as API key)
113
+ 3. Environment variables (`ZERODB_API_KEY`, `ZERODB_PROJECT_ID`)
114
+ 4. Config file (`~/.zerodb/config.json`)
115
+ 5. Auto-provision (free, no signup)
116
+
117
+ ### Query Builder
118
+
119
+ | Method | Description |
120
+ |--------|-------------|
121
+ | `table(name).select('*')` | Select rows |
122
+ | `table(name).insert(data)` | Insert row(s) |
123
+ | `table(name).update(data)` | Update rows |
124
+ | `table(name).upsert(data)` | Insert or update |
125
+ | `table(name).delete()` | Delete rows |
126
+
127
+ ### Filters (Chainable)
128
+
129
+ | Method | SQL Equivalent |
130
+ |--------|---------------|
131
+ | `.eq(col, val)` | `WHERE col = val` |
132
+ | `.neq(col, val)` | `WHERE col != val` |
133
+ | `.gt(col, val)` | `WHERE col > val` |
134
+ | `.gte(col, val)` | `WHERE col >= val` |
135
+ | `.lt(col, val)` | `WHERE col < val` |
136
+ | `.lte(col, val)` | `WHERE col <= val` |
137
+ | `.like(col, pattern)` | `WHERE col LIKE pattern` |
138
+ | `.ilike(col, pattern)` | `WHERE col ILIKE pattern` |
139
+ | `.is_(col, val)` | `WHERE col IS val` |
140
+ | `.in_(col, list)` | `WHERE col IN (list)` |
141
+ | `.contains(col, val)` | `WHERE col @> val` |
142
+ | `.not_(col, op, val)` | Negate filter |
143
+
144
+ ### Modifiers
145
+
146
+ | Method | Description |
147
+ |--------|-------------|
148
+ | `.order(col, desc=False)` | Order results |
149
+ | `.limit(n)` | Limit results |
150
+ | `.offset(n)` | Skip rows |
151
+ | `.range(start, end)` | Row range |
152
+ | `.single()` | Return one row |
153
+ | `.maybe_single()` | Return one or None |
154
+
155
+ ### Storage
156
+
157
+ ```python
158
+ bucket = client.storage.from_('bucket-name')
159
+ bucket.upload('path/file.png', file_data)
160
+ bucket.download('path/file.png')
161
+ bucket.get_public_url('path/file.png')
162
+ bucket.create_signed_url('path/file.png', expires_in=3600)
163
+ bucket.remove(['file1.png', 'file2.png'])
164
+ bucket.list()
165
+ bucket.move('old.png', 'new.png')
166
+ bucket.copy('src.png', 'dst.png')
167
+ ```
168
+
169
+ ### Functions
170
+
171
+ ```python
172
+ # Invoke a function
173
+ result = client.functions.invoke('function-name', {'key': 'value'})
174
+
175
+ # List functions
176
+ functions = client.functions.list()
177
+
178
+ # RPC shorthand
179
+ result = client.rpc('function-name', {'param': 'value'})
180
+ ```
181
+
182
+ ## Configuration
183
+
184
+ ### Environment Variables
185
+
186
+ ```bash
187
+ export ZERODB_API_KEY="your-api-key"
188
+ export ZERODB_PROJECT_ID="your-project-id"
189
+ # Optional: custom endpoint
190
+ export ZERODB_BASE_URL="https://api.ainative.studio"
191
+ ```
192
+
193
+ ### Config File
194
+
195
+ ```json
196
+ // ~/.zerodb/config.json
197
+ {
198
+ "api_key": "your-api-key",
199
+ "project_id": "your-project-id"
200
+ }
201
+ ```
202
+
203
+ ### Auto-Provisioning
204
+
205
+ If no credentials are found, `zerodb-supabase` automatically creates a free ZeroDB project. Credentials are saved to `~/.zerodb/config.json` for future use.
206
+
207
+ ## Supabase Migration Guide
208
+
209
+ ### 1. Install
210
+
211
+ ```bash
212
+ pip uninstall supabase
213
+ pip install zerodb-supabase
214
+ ```
215
+
216
+ ### 2. Update imports
217
+
218
+ ```python
219
+ # Before
220
+ from supabase import create_client, Client
221
+
222
+ # After
223
+ from zerodb_supabase import create_client, Client
224
+ ```
225
+
226
+ ### 3. Remove Supabase config
227
+
228
+ No more `SUPABASE_URL` or `SUPABASE_KEY` environment variables needed. ZeroDB auto-provisions.
229
+
230
+ ### 4. That's it
231
+
232
+ All your queries, storage calls, and function invocations work unchanged.
233
+
234
+ ---
235
+
236
+ **Built by [AINative Studio](https://ainative.studio)**
237
+
238
+ Free database for AI agents. Auto-provisions in 200ms.
239
+
240
+ [Get started](https://ainative.studio) | [Documentation](https://docs.ainative.studio) | [GitHub](https://github.com/AINative-Studio/zerodb-supabase)
241
+
242
+ ## License
243
+
244
+ MIT
@@ -0,0 +1,215 @@
1
+ # zerodb-supabase
2
+
3
+ **Drop-in replacement for [supabase-py](https://pypi.org/project/supabase/) backed by ZeroDB.**
4
+
5
+ Same API. Free cloud database. No Supabase account needed.
6
+
7
+ [![PyPI](https://img.shields.io/pypi/v/zerodb-supabase)](https://pypi.org/project/zerodb-supabase/)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+
10
+ ## Why switch?
11
+
12
+ | | supabase-py | zerodb-supabase |
13
+ |---|---|---|
14
+ | **Database** | Supabase Cloud (paid after free tier) | ZeroDB (free tier) |
15
+ | **Storage** | Supabase Storage (limited) | ZeroDB S3-compatible (generous) |
16
+ | **Functions** | Edge Functions (Deno only) | ZeroDB Functions (Python, JS, TS) |
17
+ | **Provisioning** | Manual dashboard setup | Auto-provision on first use |
18
+ | **Vectors** | pgvector extension | Built-in vector search |
19
+ | **AI Memory** | Not available | ZeroMemory cognitive memory |
20
+ | **License** | Apache-2.0 | MIT |
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pip install zerodb-supabase
26
+ ```
27
+
28
+ ## Migration (30 seconds)
29
+
30
+ Change one import:
31
+
32
+ ```python
33
+ # Before
34
+ from supabase import create_client
35
+
36
+ # After
37
+ from zerodb_supabase import create_client
38
+ ```
39
+
40
+ That's it. Every method works the same.
41
+
42
+ ## Quick Start
43
+
44
+ ```python
45
+ from zerodb_supabase import create_client
46
+
47
+ # Auto-provisions a free ZeroDB project on first use
48
+ client = create_client()
49
+
50
+ # Query data
51
+ data = client.table('users').select('*').eq('active', True).execute()
52
+ print(data.data) # [{'id': 1, 'name': 'Alice', 'active': True}, ...]
53
+
54
+ # Insert data
55
+ client.table('users').insert({
56
+ 'name': 'Alice',
57
+ 'email': 'alice@example.com'
58
+ }).execute()
59
+
60
+ # Update data
61
+ client.table('users').update({
62
+ 'name': 'Alice Updated'
63
+ }).eq('id', 1).execute()
64
+
65
+ # Delete data
66
+ client.table('users').delete().eq('id', 1).execute()
67
+
68
+ # Storage (S3-compatible)
69
+ client.storage.from_('avatars').upload('avatar.png', open('avatar.png', 'rb'))
70
+ url = client.storage.from_('avatars').get_public_url('avatar.png')
71
+
72
+ # Functions (ZeroDB Functions)
73
+ result = client.functions.invoke('process-upload', {'file_id': '123'})
74
+ print(result.data)
75
+ ```
76
+
77
+ ## API Reference
78
+
79
+ ### `create_client(supabase_url=None, supabase_key=None, **kwargs)`
80
+
81
+ Create a client. Credentials resolved in order:
82
+ 1. Constructor arguments (`api_key`, `project_id`)
83
+ 2. Supabase-compatible args (`supabase_key` used as API key)
84
+ 3. Environment variables (`ZERODB_API_KEY`, `ZERODB_PROJECT_ID`)
85
+ 4. Config file (`~/.zerodb/config.json`)
86
+ 5. Auto-provision (free, no signup)
87
+
88
+ ### Query Builder
89
+
90
+ | Method | Description |
91
+ |--------|-------------|
92
+ | `table(name).select('*')` | Select rows |
93
+ | `table(name).insert(data)` | Insert row(s) |
94
+ | `table(name).update(data)` | Update rows |
95
+ | `table(name).upsert(data)` | Insert or update |
96
+ | `table(name).delete()` | Delete rows |
97
+
98
+ ### Filters (Chainable)
99
+
100
+ | Method | SQL Equivalent |
101
+ |--------|---------------|
102
+ | `.eq(col, val)` | `WHERE col = val` |
103
+ | `.neq(col, val)` | `WHERE col != val` |
104
+ | `.gt(col, val)` | `WHERE col > val` |
105
+ | `.gte(col, val)` | `WHERE col >= val` |
106
+ | `.lt(col, val)` | `WHERE col < val` |
107
+ | `.lte(col, val)` | `WHERE col <= val` |
108
+ | `.like(col, pattern)` | `WHERE col LIKE pattern` |
109
+ | `.ilike(col, pattern)` | `WHERE col ILIKE pattern` |
110
+ | `.is_(col, val)` | `WHERE col IS val` |
111
+ | `.in_(col, list)` | `WHERE col IN (list)` |
112
+ | `.contains(col, val)` | `WHERE col @> val` |
113
+ | `.not_(col, op, val)` | Negate filter |
114
+
115
+ ### Modifiers
116
+
117
+ | Method | Description |
118
+ |--------|-------------|
119
+ | `.order(col, desc=False)` | Order results |
120
+ | `.limit(n)` | Limit results |
121
+ | `.offset(n)` | Skip rows |
122
+ | `.range(start, end)` | Row range |
123
+ | `.single()` | Return one row |
124
+ | `.maybe_single()` | Return one or None |
125
+
126
+ ### Storage
127
+
128
+ ```python
129
+ bucket = client.storage.from_('bucket-name')
130
+ bucket.upload('path/file.png', file_data)
131
+ bucket.download('path/file.png')
132
+ bucket.get_public_url('path/file.png')
133
+ bucket.create_signed_url('path/file.png', expires_in=3600)
134
+ bucket.remove(['file1.png', 'file2.png'])
135
+ bucket.list()
136
+ bucket.move('old.png', 'new.png')
137
+ bucket.copy('src.png', 'dst.png')
138
+ ```
139
+
140
+ ### Functions
141
+
142
+ ```python
143
+ # Invoke a function
144
+ result = client.functions.invoke('function-name', {'key': 'value'})
145
+
146
+ # List functions
147
+ functions = client.functions.list()
148
+
149
+ # RPC shorthand
150
+ result = client.rpc('function-name', {'param': 'value'})
151
+ ```
152
+
153
+ ## Configuration
154
+
155
+ ### Environment Variables
156
+
157
+ ```bash
158
+ export ZERODB_API_KEY="your-api-key"
159
+ export ZERODB_PROJECT_ID="your-project-id"
160
+ # Optional: custom endpoint
161
+ export ZERODB_BASE_URL="https://api.ainative.studio"
162
+ ```
163
+
164
+ ### Config File
165
+
166
+ ```json
167
+ // ~/.zerodb/config.json
168
+ {
169
+ "api_key": "your-api-key",
170
+ "project_id": "your-project-id"
171
+ }
172
+ ```
173
+
174
+ ### Auto-Provisioning
175
+
176
+ If no credentials are found, `zerodb-supabase` automatically creates a free ZeroDB project. Credentials are saved to `~/.zerodb/config.json` for future use.
177
+
178
+ ## Supabase Migration Guide
179
+
180
+ ### 1. Install
181
+
182
+ ```bash
183
+ pip uninstall supabase
184
+ pip install zerodb-supabase
185
+ ```
186
+
187
+ ### 2. Update imports
188
+
189
+ ```python
190
+ # Before
191
+ from supabase import create_client, Client
192
+
193
+ # After
194
+ from zerodb_supabase import create_client, Client
195
+ ```
196
+
197
+ ### 3. Remove Supabase config
198
+
199
+ No more `SUPABASE_URL` or `SUPABASE_KEY` environment variables needed. ZeroDB auto-provisions.
200
+
201
+ ### 4. That's it
202
+
203
+ All your queries, storage calls, and function invocations work unchanged.
204
+
205
+ ---
206
+
207
+ **Built by [AINative Studio](https://ainative.studio)**
208
+
209
+ Free database for AI agents. Auto-provisions in 200ms.
210
+
211
+ [Get started](https://ainative.studio) | [Documentation](https://docs.ainative.studio) | [GitHub](https://github.com/AINative-Studio/zerodb-supabase)
212
+
213
+ ## License
214
+
215
+ MIT
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "zerodb-supabase"
7
+ version = "0.1.0"
8
+ description = "Drop-in Supabase Python client replacement backed by ZeroDB. Same API, free cloud database."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.8"
12
+ authors = [
13
+ {name = "AINative Studio", email = "dev@ainative.studio"},
14
+ ]
15
+ keywords = [
16
+ "supabase",
17
+ "supabase-alternative",
18
+ "supabase-py",
19
+ "supabase-python",
20
+ "supabase-client",
21
+ "database",
22
+ "postgres",
23
+ "rest-api",
24
+ "zerodb",
25
+ "ainative",
26
+ "baas",
27
+ "backend-as-a-service",
28
+ "storage",
29
+ "file-storage",
30
+ "s3-compatible",
31
+ "edge-functions",
32
+ "serverless-functions",
33
+ "realtime",
34
+ "vector-database",
35
+ "embeddings",
36
+ "ai-database",
37
+ "free-database",
38
+ "firebase-alternative",
39
+ "neon-alternative",
40
+ "planetscale-alternative",
41
+ "mcp",
42
+ "claude",
43
+ "cursor",
44
+ ]
45
+ classifiers = [
46
+ "Development Status :: 4 - Beta",
47
+ "Intended Audience :: Developers",
48
+ "Programming Language :: Python :: 3",
49
+ "Programming Language :: Python :: 3.8",
50
+ "Programming Language :: Python :: 3.9",
51
+ "Programming Language :: Python :: 3.10",
52
+ "Programming Language :: Python :: 3.11",
53
+ "Programming Language :: Python :: 3.12",
54
+ "Programming Language :: Python :: 3.13",
55
+ "Topic :: Database",
56
+ "Topic :: Internet :: WWW/HTTP",
57
+ "Topic :: Software Development :: Libraries :: Python Modules",
58
+ ]
59
+ dependencies = [
60
+ "requests>=2.28",
61
+ ]
62
+
63
+ [project.urls]
64
+ Homepage = "https://github.com/AINative-Studio/zerodb-supabase"
65
+ Documentation = "https://docs.ainative.studio"
66
+ Repository = "https://github.com/AINative-Studio/zerodb-supabase"
67
+ Issues = "https://github.com/AINative-Studio/zerodb-supabase/issues"
68
+
69
+ [tool.setuptools.packages.find]
70
+ include = ["zerodb_supabase*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+