cinchdb 0.1.9__py3-none-any.whl → 0.1.11__py3-none-any.whl

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.
cinchdb/models/table.py CHANGED
@@ -50,9 +50,6 @@ class Column(BaseModel):
50
50
  default: Optional[str] = Field(
51
51
  default=None, description="Default value SQL expression"
52
52
  )
53
- primary_key: bool = Field(
54
- default=False, description="Whether this is a primary key"
55
- )
56
53
  unique: bool = Field(default=False, description="Whether values must be unique")
57
54
  foreign_key: Optional[ForeignKeyRef] = Field(
58
55
  default=None, description="Foreign key constraint specification"
@@ -81,7 +78,6 @@ class Table(CinchDBBaseModel):
81
78
  name="id",
82
79
  type="TEXT",
83
80
  nullable=False,
84
- primary_key=True,
85
81
  unique=True,
86
82
  ),
87
83
  )
cinchdb/models/tenant.py CHANGED
@@ -19,9 +19,11 @@ class Tenant(CinchDBBaseModel):
19
19
  @classmethod
20
20
  def validate_name_field(cls, v: str) -> str:
21
21
  """Validate tenant name meets naming requirements."""
22
- validate_name(v, "tenant")
22
+ # Allow __empty__ as a special system tenant
23
+ if v != "__empty__":
24
+ validate_name(v, "tenant")
23
25
  return v
24
26
 
25
27
  def can_delete(self) -> bool:
26
28
  """Check if this tenant can be deleted."""
27
- return self.name != "main" and not self.is_main
29
+ return self.name not in ["main", "__empty__"] and not self.is_main
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cinchdb
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: A Git-like SQLite database management system with branching and multi-tenancy
5
5
  Project-URL: Homepage, https://github.com/russellromney/cinchdb
6
6
  Project-URL: Documentation, https://russellromney.github.io/cinchdb
@@ -58,10 +58,7 @@ cinch branch merge-into-main feature
58
58
  cinch tenant create customer_a
59
59
  cinch query "SELECT * FROM users" --tenant customer_a
60
60
 
61
- # Coming soon
62
- # Connect to remote CinchDB instance
63
- cinch remote add production https://your-cinchdb-server.com your-api-key
64
- cinch remote use production
61
+ # Future: Remote connectivity planned for production deployment
65
62
 
66
63
  # Autogenerate Python SDK from database
67
64
  cinch codegen generate python cinchdb_models/
@@ -75,9 +72,7 @@ CinchDB combines SQLite with Git-like workflows for database schema management:
75
72
  - **Multi-tenant isolation** - shared schema, isolated data per tenant
76
73
  - **Automatic change tracking** - all schema changes tracked and mergeable
77
74
  - **Safe structure changes** - change merges happen atomically with zero rollback risk (seriously)
78
- - **Remote connectivity** - Connect to hosted CinchDB instances
79
- - **Type-safe SDK** - Python and TypeScript SDKs with full type safety
80
- - **Remote-capable** - coming soon - CLI and SDK can connect to remote instances
75
+ - **Type-safe Python SDK** - Python SDK with full type safety
81
76
  - **SDK generation from database schema** - Generate a typesafe SDK from your database models for CRUD operations
82
77
 
83
78
  ## Installation
@@ -149,37 +144,11 @@ results = db.insert("posts", *post_list)
149
144
  db.update("posts", post_id, {"content": "Updated content"})
150
145
  ```
151
146
 
152
- ### Remote Connection
153
-
154
- Coming soon.
155
-
156
- ```python
157
- # Connect to remote instance
158
- db = cinchdb.connect("myapp", url="https://your-cinchdb-server.com", api_key="your-api-key")
159
-
160
- # Same interface as local
161
- results = db.query("SELECT * FROM users")
162
- user_id = db.insert("users", {"username": "alice", "email": "alice@example.com"})
163
- ```
164
-
165
- ## Remote Access - coming soon
166
-
167
- Connect to a remote CinchDB instance:
168
-
169
- ```bash
170
- cinch remote add production https://your-cinchdb-server.com your-api-key
171
- cinch remote use production
172
- # Now all commands will use the remote instance
173
- ```
174
-
175
- Interactive docs at `/docs`, health check at `/health`.
176
147
 
177
148
  ## Architecture
178
149
 
179
- - **Python SDK**: Core functionality (local + remote)
180
- - **CLI**: Full-featured command-line interface
181
- - **Remote Access**: Connect to hosted CinchDB instances
182
- - **TypeScript SDK**: Browser and Node.js client
150
+ - **Python SDK**: Core functionality for local development
151
+ - **CLI**: Full-featured command-line interface
183
152
 
184
153
  ## Development
185
154
 
@@ -2,40 +2,42 @@ cinchdb/__init__.py,sha256=NZdSzfhRguSBTjJ2dcESOQYy53OZEuBndlB7U08GMY0,179
2
2
  cinchdb/__main__.py,sha256=OpkDqn9zkTZhhYgvv_grswWLAHKbmxs4M-8C6Z5HfWY,85
3
3
  cinchdb/config.py,sha256=gocjMnYKLWhgvnteo6zprgwtK6Oevoxq547J_v-C9Ns,5265
4
4
  cinchdb/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- cinchdb/cli/main.py,sha256=tGX8Z78Oy4rukXth56Xp_pm52rijIDujyMdhSEhFWPw,4790
6
- cinchdb/cli/utils.py,sha256=NREFxN9k53FnPbDoPt4SXmdZzlzw9zUMv5ICQwTT8gk,5679
5
+ cinchdb/cli/main.py,sha256=iAh19hD4uiWmQmvGS6gZD7WodLxoYUXK8lsZsf7BJdA,4461
6
+ cinchdb/cli/utils.py,sha256=InAGuo7uENvsfBQu6EKIbbiNXqmvg-BecLmhLvOz5qg,6485
7
7
  cinchdb/cli/commands/__init__.py,sha256=IRUIPHgdpF4hBDbDy0SgaWn39o5GNUjH54_C42sjlQg,273
8
8
  cinchdb/cli/commands/branch.py,sha256=Nz8YQYJ7lizSXEAv0usTx85TDOC-N5Ul9KIxN8JQtKc,17973
9
9
  cinchdb/cli/commands/codegen.py,sha256=WsRWmXNTDuaLPyECW5psXM9zOQnKHpUiv8BJnBAjMII,6189
10
- cinchdb/cli/commands/column.py,sha256=ISHRmcoLf1fAbPqC2MaAYH7Fc6xZWtzCMSRh7_9o-lY,11757
11
- cinchdb/cli/commands/database.py,sha256=-UCOnn3VatdNog-fX5pguJ2GKdSSXQN99-LSVwkvinY,6857
10
+ cinchdb/cli/commands/column.py,sha256=nUVgjYbxSobJR9CC-qdOvrCl1TgFySr-ctQb0djKZtQ,11676
11
+ cinchdb/cli/commands/database.py,sha256=A3ew8Z987a25dRxmY5XeoB-Ka6SXLKtWogj3XAKUNZE,7332
12
12
  cinchdb/cli/commands/index.py,sha256=P0sM9lu1rVliacYl49LPqtxNYdrwzKzpVKW10jC-5i4,6096
13
13
  cinchdb/cli/commands/query.py,sha256=XW_YL6M5IYHHHMpVB5p-M01kawFxwDOK5B5hGIy_BA8,5044
14
14
  cinchdb/cli/commands/remote.py,sha256=i07hfiAxgrROB9lVJVaKK_nWxT1SGiSbtFb4jvEwxEo,4445
15
- cinchdb/cli/commands/table.py,sha256=NxfOTCd9beaujffiAPiW0Vko0--HS1JVeCwBMp_khx4,10518
15
+ cinchdb/cli/commands/table.py,sha256=K233WOV102-g6QlHhL97FhfiGz67zIctbxZblAjY4Lg,10516
16
16
  cinchdb/cli/commands/tenant.py,sha256=cOWs9Gf13ZE4KTKJZ_AvDwFDdXBUn5i-Av4MoUsc8Go,6199
17
17
  cinchdb/cli/commands/view.py,sha256=ZmS1IW7idzzHAXmgVyY3C4IQRo7toHb6fHNFY_tQJjI,6385
18
18
  cinchdb/cli/handlers/__init__.py,sha256=f2f-Cc96rSBLbVsiIbf-b4pZCKZoHfmhNEvnZ0OurRs,131
19
19
  cinchdb/cli/handlers/codegen_handler.py,sha256=i5we_AbiUW3zfO6pIKWxvtO8OvOqz3H__4xPmTLEuQM,6524
20
20
  cinchdb/core/__init__.py,sha256=iNlT0iO9cM0HLoYwzBavUBoXRh1Tcnz1l_vfbwVxK_Q,246
21
21
  cinchdb/core/connection.py,sha256=SlKyEfIpeaDws8M6SfEbvCEVnt26zBY1RYwHtTXj0kY,5110
22
- cinchdb/core/database.py,sha256=yeBxzxgKz20Dtoilzj609GHrD3UL2bWG4ArWrRM2VnA,22090
23
- cinchdb/core/initializer.py,sha256=CjnJSMuR1NrHobyFfwL44tUeH8VE62q02bijEtVH3p4,6922
22
+ cinchdb/core/database.py,sha256=vzVr6Y6iydf9kOU0OO7yVYoHQJ3zlfwAWF2LylJUV0I,27162
23
+ cinchdb/core/initializer.py,sha256=CAzq947plgEF-KXV-PD-ycJ8Zy4zXCQqCrmQ0-pV0i4,14474
24
24
  cinchdb/core/maintenance.py,sha256=PAgrSL7Cj9p3rKHV0h_L7gupN6nLD0-5eQpJZNiqyEs,2097
25
- cinchdb/core/path_utils.py,sha256=J2UEu1X_NFOqDamcsrPrC7ZitGTg9Y-HFjmx4sHf5j8,3806
25
+ cinchdb/core/path_utils.py,sha256=OPT5WGx6CPdjZbvNsB5fjJGKsl5RtW8-IFacE4TWSxA,4884
26
+ cinchdb/infrastructure/metadata_connection_pool.py,sha256=oq4z2B43_kEPUA0QVZz6AI_xl4adOuOSJ7VeZ7ecmP4,4899
27
+ cinchdb/infrastructure/metadata_db.py,sha256=QLVHtvto9c2yJw7022JXwfaEilS-k-OICsbHQvA6QSQ,15314
26
28
  cinchdb/managers/__init__.py,sha256=ic61ZUdsg-muq0ETYO6fuZRQWF4j7l920PthTkt2QrE,808
27
- cinchdb/managers/branch.py,sha256=FkF2i5vZ8ifldGm9tLcgPNymifFdBbpCrfLorIBYCiE,5330
28
- cinchdb/managers/change_applier.py,sha256=cHPhPgbJ9jeyrb6lkfRyumS8IHat0HiWfwZh-n7ButA,14310
29
+ cinchdb/managers/branch.py,sha256=ctX2RpodtQ-fLMpGzHyJMydseb0rK4gLjMz2ix82seU,9455
30
+ cinchdb/managers/change_applier.py,sha256=cCgjUL6SJvrgVCCHAw0mAbGqZqKmMsLa0QbziSiuW68,15576
29
31
  cinchdb/managers/change_comparator.py,sha256=08pwybpSt36cFwhZRSIkHynvFMUaLKEVwa8Ajn_R9yQ,6862
30
32
  cinchdb/managers/change_tracker.py,sha256=U93BPnuGv8xSaO5qr_y5Q8ppKrVXygozdp5zUvLUqwg,5054
31
33
  cinchdb/managers/codegen.py,sha256=1CfIwjgHnNDdjrq4SzQ9VE7DFgnWfk7RtpupBFUTqxk,21804
32
- cinchdb/managers/column.py,sha256=YhYq-hnH0o2BqZkyihnsY5KIWEztzs-_iLJNZMdVUkk,20807
34
+ cinchdb/managers/column.py,sha256=i0EzDKavMvZeeaVrY9OVRNHOW60v0rUEkDjMtIs3PaE,20749
33
35
  cinchdb/managers/data.py,sha256=zS1HkMGf436m6f8VdFAqQbQFgo4sL5yKJRcRf4A6lIc,16253
34
36
  cinchdb/managers/index.py,sha256=n9bCXggZP6muJQZXCpTT46JvuvcbbnYgeV3j6iXtTVM,10371
35
37
  cinchdb/managers/merge_manager.py,sha256=R8S2hLkLJg4hLDpeJTzjVkduZgqPOjXtYgOSJhTXXrE,15690
36
- cinchdb/managers/query.py,sha256=pBlbqoovnFsZ36pB7nv8NtzcTFwtT26hp8IlwjIx29Q,7301
37
- cinchdb/managers/table.py,sha256=GltELZ465M8JYwZB5xoMDOvyhRYm-HflPJsQQTStD2c,13837
38
- cinchdb/managers/tenant.py,sha256=wBAGox6CYVPKp6y05iBRFUY2xF6QvOGzVa2WMsGPDsE,9081
38
+ cinchdb/managers/query.py,sha256=mBWsWjdAqWDzuvxKsY49onAOP6dsZOMhVKwA7Y1kunE,8617
39
+ cinchdb/managers/table.py,sha256=8w6L4-DJgvsvpTYDW123Y9JuXO95O-SfOs-XMqWSvzA,14028
40
+ cinchdb/managers/tenant.py,sha256=szmgErdqs3KXPi5LugMnUR76PxWARMj6H6y-JvcYd68,33965
39
41
  cinchdb/managers/view.py,sha256=v9gYtRufZyxywPKLGvIjvlUXcxYh9CLRArefu9QX6zk,7809
40
42
  cinchdb/models/__init__.py,sha256=cZ-ailJ6qu44Iap5Rq555iB-_w9ufXVDBH3rDH-ojk0,622
41
43
  cinchdb/models/base.py,sha256=7j4rlFTP5K9ZuF8vxwC7lMFEaL7O90NJ47Ig5i7ubcw,1320
@@ -43,14 +45,14 @@ cinchdb/models/branch.py,sha256=gRgLpRFkMC3fxf9ZigVOkS6wdkBERWqlLk0_gOYjqNk,1180
43
45
  cinchdb/models/change.py,sha256=YpBWdI6yMT3uucd8duET9s75xr5JUWJqurkkyTlXPlk,1449
44
46
  cinchdb/models/database.py,sha256=QrWd_SkE1G8TMWflO4sXRUbSdbqcrfGOt2e-PS7OW7A,971
45
47
  cinchdb/models/project.py,sha256=6GMXUZUsEIebqQJgRXIthWzpWKuNNmJ3drgI1vFDrMo,644
46
- cinchdb/models/table.py,sha256=hamYjYUunNnVBMcE5NNyubS5Y8_wTJ8_aMnA5r8mpkE,3097
47
- cinchdb/models/tenant.py,sha256=UKYTKM4mQH3IqEjI_tOU5CszwBWH4cXa3lI0mpMFF_4,967
48
+ cinchdb/models/table.py,sha256=nxf__C_YvDOW-6-vdOQ4xKmwWPZwgEdYw1I4mO_C44o,2955
49
+ cinchdb/models/tenant.py,sha256=wTvGoO_tQdtueVB0faZFVIhSjh_DNJzywflrUpngWTM,1072
48
50
  cinchdb/models/view.py,sha256=q6j-jYzFJuhRJO87rKt6Uv8hOizHQx8xwoPKoH6XnNY,530
49
51
  cinchdb/utils/__init__.py,sha256=yQQhEjndDiB2SUJybUmp9dvEOQKiR-GySe-WiCius5E,490
50
52
  cinchdb/utils/name_validator.py,sha256=dyGX5bjlTFRA9EGrWRQKp6kR__HSV04hLV5VueJs4IQ,4027
51
53
  cinchdb/utils/sql_validator.py,sha256=aWOGlPX0gBkuR6R1EBP2stbP4PHZuI6FUBi2Ljx7JUI,5815
52
- cinchdb-0.1.9.dist-info/METADATA,sha256=GAGW_oGksTwm_MMCxupXuVTslERomeeGge0KDzr6AoE,6334
53
- cinchdb-0.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
54
- cinchdb-0.1.9.dist-info/entry_points.txt,sha256=VBOIzvnGbkKudMCCmNORS3885QSyjZUVKJQ-Syqa62w,47
55
- cinchdb-0.1.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
- cinchdb-0.1.9.dist-info/RECORD,,
54
+ cinchdb-0.1.11.dist-info/METADATA,sha256=o2nV5F9UWCuphDB4Ilq02BaBHsDtb_K0JK4OdOtQV48,5374
55
+ cinchdb-0.1.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
+ cinchdb-0.1.11.dist-info/entry_points.txt,sha256=VBOIzvnGbkKudMCCmNORS3885QSyjZUVKJQ-Syqa62w,47
57
+ cinchdb-0.1.11.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
58
+ cinchdb-0.1.11.dist-info/RECORD,,