kvgit 0.4.2__tar.gz → 0.5.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.
Files changed (109) hide show
  1. kvgit-0.5.0/Cargo.lock +329 -0
  2. kvgit-0.5.0/Cargo.toml +19 -0
  3. {kvgit-0.4.2 → kvgit-0.5.0}/PKG-INFO +51 -49
  4. kvgit-0.5.0/crates/core/Cargo.toml +11 -0
  5. kvgit-0.5.0/crates/core/src/ancestry.rs +261 -0
  6. kvgit-0.5.0/crates/core/src/base64.rs +91 -0
  7. kvgit-0.5.0/crates/core/src/cache.rs +400 -0
  8. kvgit-0.5.0/crates/core/src/commit.rs +43 -0
  9. kvgit-0.5.0/crates/core/src/error.rs +154 -0
  10. kvgit-0.5.0/crates/core/src/gc.rs +454 -0
  11. kvgit-0.5.0/crates/core/src/hash.rs +31 -0
  12. kvgit-0.5.0/crates/core/src/head.rs +365 -0
  13. kvgit-0.5.0/crates/core/src/history.rs +566 -0
  14. kvgit-0.5.0/crates/core/src/json.rs +693 -0
  15. kvgit-0.5.0/crates/core/src/keyset.rs +148 -0
  16. kvgit-0.5.0/crates/core/src/layout.rs +174 -0
  17. kvgit-0.5.0/crates/core/src/lease.rs +147 -0
  18. kvgit-0.5.0/crates/core/src/lib.rs +41 -0
  19. kvgit-0.5.0/crates/core/src/machine.rs +645 -0
  20. kvgit-0.5.0/crates/core/src/merge.rs +316 -0
  21. kvgit-0.5.0/crates/core/src/ops.rs +753 -0
  22. kvgit-0.5.0/crates/core/src/refs.rs +411 -0
  23. kvgit-0.5.0/crates/core/src/store.rs +28 -0
  24. kvgit-0.5.0/crates/core/src/synced.rs +447 -0
  25. kvgit-0.5.0/crates/core/src/text.rs +576 -0
  26. kvgit-0.5.0/crates/core/src/tree.rs +1399 -0
  27. kvgit-0.5.0/crates/core/src/version.rs +58 -0
  28. kvgit-0.5.0/crates/core/src/wire.rs +396 -0
  29. kvgit-0.5.0/crates/core/src/worktree.rs +216 -0
  30. kvgit-0.5.0/crates/core/src/write.rs +949 -0
  31. kvgit-0.5.0/crates/core/tests/ancestry.rs +205 -0
  32. kvgit-0.5.0/crates/core/tests/commit_races.rs +402 -0
  33. kvgit-0.5.0/crates/core/tests/corpus_commits.rs +1166 -0
  34. kvgit-0.5.0/crates/core/tests/corpus_stores.rs +180 -0
  35. kvgit-0.5.0/crates/core/tests/fixtures/float-repr.txt +3440 -0
  36. kvgit-0.5.0/crates/core/tests/fixtures/make_float_repr.py +38 -0
  37. kvgit-0.5.0/crates/core/tests/fixtures/make_text_merge.py +76 -0
  38. kvgit-0.5.0/crates/core/tests/fixtures/make_tree_ops.py +35 -0
  39. kvgit-0.5.0/crates/core/tests/fixtures/text-merge.json +16502 -0
  40. kvgit-0.5.0/crates/core/tests/fixtures/tree-ops.json +8757 -0
  41. kvgit-0.5.0/crates/core/tests/float_repr.rs +18 -0
  42. kvgit-0.5.0/crates/core/tests/refs.rs +533 -0
  43. kvgit-0.5.0/crates/core/tests/synced.rs +276 -0
  44. kvgit-0.5.0/crates/core/tests/text_merge.rs +44 -0
  45. kvgit-0.5.0/crates/core/tests/tree_ops.rs +89 -0
  46. kvgit-0.5.0/crates/core/tests/wire.rs +334 -0
  47. kvgit-0.5.0/crates/py/Cargo.toml +21 -0
  48. kvgit-0.5.0/crates/py/src/lib.rs +1170 -0
  49. {kvgit-0.4.2 → kvgit-0.5.0}/pyproject.toml +33 -18
  50. {kvgit-0.4.2 → kvgit-0.5.0/python}/README.md +19 -14
  51. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/__init__.py +20 -8
  52. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/_codec.py +30 -1
  53. kvgit-0.5.0/python/kvgit/_core.pyi +176 -0
  54. kvgit-0.5.0/python/kvgit/_drive.py +219 -0
  55. kvgit-0.5.0/python/kvgit/_engine.py +314 -0
  56. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/_open.py +15 -15
  57. kvgit-0.5.0/python/kvgit/_store.py +645 -0
  58. kvgit-0.5.0/python/kvgit/_sync.py +460 -0
  59. kvgit-0.4.2/kvgit/versioned/protocol.py → kvgit-0.5.0/python/kvgit/_types.py +19 -0
  60. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/cache.py +135 -76
  61. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/numpy.py +2 -2
  62. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/content_types.py +1 -1
  63. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/encoding.py +1 -1
  64. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/errors.py +28 -0
  65. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/kv/__init__.py +0 -7
  66. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/kv/base.py +23 -1
  67. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/kv/composite.py +2 -2
  68. kvgit-0.5.0/python/kvgit/kv/disk.py +328 -0
  69. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/kv/postgres.py +3 -23
  70. kvgit-0.5.0/python/kvgit/merges.py +122 -0
  71. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/refs.py +39 -18
  72. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/repo.py +249 -140
  73. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/worktree.py +79 -61
  74. kvgit-0.4.2/kvgit/hamt.py +0 -820
  75. kvgit-0.4.2/kvgit/kv/disk.py +0 -107
  76. kvgit-0.4.2/kvgit/kv/indexeddb.py +0 -396
  77. kvgit-0.4.2/kvgit/merges.py +0 -323
  78. kvgit-0.4.2/kvgit/versioned/__init__.py +0 -21
  79. kvgit-0.4.2/kvgit/versioned/base.py +0 -620
  80. kvgit-0.4.2/kvgit/versioned/helpers.py +0 -55
  81. kvgit-0.4.2/kvgit/versioned/keyset.py +0 -277
  82. kvgit-0.4.2/kvgit/versioned/kv.py +0 -2514
  83. kvgit-0.4.2/kvgit/versioned/merge.py +0 -197
  84. kvgit-0.4.2/kvgit.egg-info/PKG-INFO +0 -296
  85. kvgit-0.4.2/kvgit.egg-info/SOURCES.txt +0 -53
  86. kvgit-0.4.2/kvgit.egg-info/dependency_links.txt +0 -1
  87. kvgit-0.4.2/kvgit.egg-info/requires.txt +0 -32
  88. kvgit-0.4.2/kvgit.egg-info/top_level.txt +0 -1
  89. kvgit-0.4.2/setup.cfg +0 -4
  90. kvgit-0.4.2/tests/test_cache.py +0 -272
  91. kvgit-0.4.2/tests/test_content_types.py +0 -206
  92. kvgit-0.4.2/tests/test_delete_branches.py +0 -139
  93. kvgit-0.4.2/tests/test_hamt.py +0 -974
  94. kvgit-0.4.2/tests/test_merge_policy.py +0 -789
  95. kvgit-0.4.2/tests/test_merges.py +0 -421
  96. kvgit-0.4.2/tests/test_namespaced.py +0 -238
  97. kvgit-0.4.2/tests/test_open.py +0 -118
  98. kvgit-0.4.2/tests/test_repo.py +0 -664
  99. kvgit-0.4.2/tests/test_storage_v4.py +0 -398
  100. kvgit-0.4.2/tests/test_worktree.py +0 -655
  101. {kvgit-0.4.2 → kvgit-0.5.0}/LICENSE +0 -0
  102. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/__init__.py +0 -0
  103. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/_hash.py +0 -0
  104. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/base.py +0 -0
  105. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/pandas.py +0 -0
  106. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/codecs/pickler.py +0 -0
  107. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/kv/memory.py +0 -0
  108. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/namespaced.py +0 -0
  109. {kvgit-0.4.2 → kvgit-0.5.0/python}/kvgit/py.typed +0 -0
kvgit-0.5.0/Cargo.lock ADDED
@@ -0,0 +1,329 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "block-buffer"
7
+ version = "0.12.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
10
+ dependencies = [
11
+ "hybrid-array",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "bumpalo"
16
+ version = "3.20.3"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
19
+
20
+ [[package]]
21
+ name = "cfg-if"
22
+ version = "1.0.5"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
25
+
26
+ [[package]]
27
+ name = "const-oid"
28
+ version = "0.10.2"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
31
+
32
+ [[package]]
33
+ name = "cpufeatures"
34
+ version = "0.3.1"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
37
+ dependencies = [
38
+ "libc",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "crypto-common"
43
+ version = "0.2.2"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
46
+ dependencies = [
47
+ "hybrid-array",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "digest"
52
+ version = "0.11.3"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
55
+ dependencies = [
56
+ "block-buffer",
57
+ "const-oid",
58
+ "crypto-common",
59
+ ]
60
+
61
+ [[package]]
62
+ name = "futures-core"
63
+ version = "0.3.34"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
66
+
67
+ [[package]]
68
+ name = "futures-task"
69
+ version = "0.3.34"
70
+ source = "registry+https://github.com/rust-lang/crates.io-index"
71
+ checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
72
+
73
+ [[package]]
74
+ name = "futures-util"
75
+ version = "0.3.34"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
78
+ dependencies = [
79
+ "futures-core",
80
+ "futures-task",
81
+ "pin-project-lite",
82
+ "slab",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "heck"
87
+ version = "0.5.0"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
90
+
91
+ [[package]]
92
+ name = "hybrid-array"
93
+ version = "0.4.15"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
96
+ dependencies = [
97
+ "typenum",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "js-sys"
102
+ version = "0.3.106"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
105
+ dependencies = [
106
+ "cfg-if",
107
+ "futures-util",
108
+ "wasm-bindgen",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "kvgit-core"
113
+ version = "0.5.0"
114
+ dependencies = [
115
+ "sha2",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "kvgit-py"
120
+ version = "0.5.0"
121
+ dependencies = [
122
+ "kvgit-core",
123
+ "pyo3",
124
+ ]
125
+
126
+ [[package]]
127
+ name = "kvgit-wasm"
128
+ version = "0.5.0"
129
+ dependencies = [
130
+ "js-sys",
131
+ "kvgit-core",
132
+ "wasm-bindgen",
133
+ ]
134
+
135
+ [[package]]
136
+ name = "libc"
137
+ version = "0.2.191"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
140
+
141
+ [[package]]
142
+ name = "once_cell"
143
+ version = "1.21.4"
144
+ source = "registry+https://github.com/rust-lang/crates.io-index"
145
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
146
+
147
+ [[package]]
148
+ name = "pin-project-lite"
149
+ version = "0.2.17"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
152
+
153
+ [[package]]
154
+ name = "portable-atomic"
155
+ version = "1.15.0"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
158
+
159
+ [[package]]
160
+ name = "proc-macro2"
161
+ version = "1.0.107"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
164
+ dependencies = [
165
+ "unicode-ident",
166
+ ]
167
+
168
+ [[package]]
169
+ name = "pyo3"
170
+ version = "0.30.1"
171
+ source = "registry+https://github.com/rust-lang/crates.io-index"
172
+ checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
173
+ dependencies = [
174
+ "libc",
175
+ "once_cell",
176
+ "portable-atomic",
177
+ "pyo3-build-config",
178
+ "pyo3-ffi",
179
+ "pyo3-macros",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "pyo3-build-config"
184
+ version = "0.30.1"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
187
+ dependencies = [
188
+ "target-lexicon",
189
+ ]
190
+
191
+ [[package]]
192
+ name = "pyo3-ffi"
193
+ version = "0.30.1"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
196
+ dependencies = [
197
+ "libc",
198
+ "pyo3-build-config",
199
+ ]
200
+
201
+ [[package]]
202
+ name = "pyo3-macros"
203
+ version = "0.30.1"
204
+ source = "registry+https://github.com/rust-lang/crates.io-index"
205
+ checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
206
+ dependencies = [
207
+ "proc-macro2",
208
+ "pyo3-macros-backend",
209
+ "quote",
210
+ "syn",
211
+ ]
212
+
213
+ [[package]]
214
+ name = "pyo3-macros-backend"
215
+ version = "0.30.1"
216
+ source = "registry+https://github.com/rust-lang/crates.io-index"
217
+ checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
218
+ dependencies = [
219
+ "heck",
220
+ "proc-macro2",
221
+ "quote",
222
+ "syn",
223
+ ]
224
+
225
+ [[package]]
226
+ name = "quote"
227
+ version = "1.0.47"
228
+ source = "registry+https://github.com/rust-lang/crates.io-index"
229
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
230
+ dependencies = [
231
+ "proc-macro2",
232
+ ]
233
+
234
+ [[package]]
235
+ name = "rustversion"
236
+ version = "1.0.23"
237
+ source = "registry+https://github.com/rust-lang/crates.io-index"
238
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
239
+
240
+ [[package]]
241
+ name = "sha2"
242
+ version = "0.11.0"
243
+ source = "registry+https://github.com/rust-lang/crates.io-index"
244
+ checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
245
+ dependencies = [
246
+ "cfg-if",
247
+ "cpufeatures",
248
+ "digest",
249
+ ]
250
+
251
+ [[package]]
252
+ name = "slab"
253
+ version = "0.4.12"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
256
+
257
+ [[package]]
258
+ name = "syn"
259
+ version = "3.0.9"
260
+ source = "registry+https://github.com/rust-lang/crates.io-index"
261
+ checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
262
+ dependencies = [
263
+ "proc-macro2",
264
+ "quote",
265
+ "unicode-ident",
266
+ ]
267
+
268
+ [[package]]
269
+ name = "target-lexicon"
270
+ version = "0.13.5"
271
+ source = "registry+https://github.com/rust-lang/crates.io-index"
272
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
273
+
274
+ [[package]]
275
+ name = "typenum"
276
+ version = "1.20.1"
277
+ source = "registry+https://github.com/rust-lang/crates.io-index"
278
+ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
279
+
280
+ [[package]]
281
+ name = "unicode-ident"
282
+ version = "1.0.27"
283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
284
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
285
+
286
+ [[package]]
287
+ name = "wasm-bindgen"
288
+ version = "0.2.129"
289
+ source = "registry+https://github.com/rust-lang/crates.io-index"
290
+ checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
291
+ dependencies = [
292
+ "cfg-if",
293
+ "once_cell",
294
+ "rustversion",
295
+ "wasm-bindgen-macro",
296
+ "wasm-bindgen-shared",
297
+ ]
298
+
299
+ [[package]]
300
+ name = "wasm-bindgen-macro"
301
+ version = "0.2.129"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
304
+ dependencies = [
305
+ "quote",
306
+ "wasm-bindgen-macro-support",
307
+ ]
308
+
309
+ [[package]]
310
+ name = "wasm-bindgen-macro-support"
311
+ version = "0.2.129"
312
+ source = "registry+https://github.com/rust-lang/crates.io-index"
313
+ checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
314
+ dependencies = [
315
+ "bumpalo",
316
+ "proc-macro2",
317
+ "quote",
318
+ "syn",
319
+ "wasm-bindgen-shared",
320
+ ]
321
+
322
+ [[package]]
323
+ name = "wasm-bindgen-shared"
324
+ version = "0.2.129"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
327
+ dependencies = [
328
+ "unicode-ident",
329
+ ]
kvgit-0.5.0/Cargo.toml ADDED
@@ -0,0 +1,19 @@
1
+ [workspace]
2
+ resolver = "3"
3
+ members = ["crates/core", "crates/py"]
4
+
5
+ [workspace.package]
6
+ version = "0.5.0"
7
+ edition = "2024"
8
+ license = "MIT"
9
+ repository = "https://github.com/ashenfad/kvgit"
10
+ rust-version = "1.85"
11
+
12
+ # The WebAssembly build: small, since it ships inside the npm package.
13
+ [profile.wasm]
14
+ inherits = "release"
15
+ opt-level = "z"
16
+ lto = true
17
+ codegen-units = 1
18
+ panic = "abort"
19
+ strip = true
@@ -1,14 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kvgit
3
- Version: 0.4.2
4
- Summary: Versioned key-value store with git-like commit, branch, and merge semantics.
5
- Author: ashenfad
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/ashenfad/kvgit
8
- Project-URL: Bug Tracker, https://github.com/ashenfad/kvgit/issues
9
- Project-URL: Documentation, https://github.com/ashenfad/kvgit#readme
10
- Project-URL: Source, https://github.com/ashenfad/kvgit
11
- Keywords: versioning,git,key-value,branching,merge
3
+ Version: 0.5.0
12
4
  Classifier: Development Status :: 4 - Beta
13
5
  Classifier: Intended Audience :: Developers
14
6
  Classifier: Topic :: Database
@@ -19,38 +11,42 @@ Classifier: Programming Language :: Python :: 3.11
19
11
  Classifier: Programming Language :: Python :: 3.12
20
12
  Classifier: Programming Language :: Python :: 3.13
21
13
  Classifier: Programming Language :: Python :: 3.14
22
- Classifier: License :: OSI Approved :: MIT License
23
14
  Classifier: Operating System :: OS Independent
24
15
  Classifier: Typing :: Typed
25
- Requires-Python: >=3.10
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
16
+ Requires-Dist: numpy>=1.24 ; extra == 'all'
17
+ Requires-Dist: pandas>=2.0 ; extra == 'all'
18
+ Requires-Dist: psycopg[binary]>=3.2 ; extra == 'all'
19
+ Requires-Dist: psycopg-pool>=3.2 ; extra == 'all'
20
+ Requires-Dist: pytest ; extra == 'dev'
21
+ Requires-Dist: diskcache ; extra == 'dev'
22
+ Requires-Dist: ruff>=0.16,<0.17 ; extra == 'dev'
23
+ Requires-Dist: numpy>=1.24 ; extra == 'dev'
24
+ Requires-Dist: pandas>=2.0 ; extra == 'dev'
25
+ Requires-Dist: numpy>=1.24 ; extra == 'numpy'
26
+ Requires-Dist: numpy>=1.24 ; extra == 'pandas'
27
+ Requires-Dist: pandas>=2.0 ; extra == 'pandas'
28
+ Requires-Dist: psycopg[binary]>=3.2 ; extra == 'postgres'
29
+ Requires-Dist: psycopg-pool>=3.2 ; extra == 'postgres'
30
+ Requires-Dist: numpy>=1.24 ; extra == 'scientific'
31
+ Requires-Dist: pandas>=2.0 ; extra == 'scientific'
32
+ Provides-Extra: all
33
+ Provides-Extra: dev
28
34
  Provides-Extra: disk
29
- Requires-Dist: diskcache; extra == "disk"
30
35
  Provides-Extra: numpy
31
- Requires-Dist: numpy>=1.24; extra == "numpy"
32
36
  Provides-Extra: pandas
33
- Requires-Dist: numpy>=1.24; extra == "pandas"
34
- Requires-Dist: pandas>=2.0; extra == "pandas"
35
- Provides-Extra: scientific
36
- Requires-Dist: numpy>=1.24; extra == "scientific"
37
- Requires-Dist: pandas>=2.0; extra == "scientific"
38
37
  Provides-Extra: postgres
39
- Requires-Dist: psycopg[binary]>=3.2; extra == "postgres"
40
- Requires-Dist: psycopg-pool>=3.2; extra == "postgres"
41
- Provides-Extra: all
42
- Requires-Dist: diskcache; extra == "all"
43
- Requires-Dist: numpy>=1.24; extra == "all"
44
- Requires-Dist: pandas>=2.0; extra == "all"
45
- Requires-Dist: psycopg[binary]>=3.2; extra == "all"
46
- Requires-Dist: psycopg-pool>=3.2; extra == "all"
47
- Provides-Extra: dev
48
- Requires-Dist: pytest; extra == "dev"
49
- Requires-Dist: diskcache; extra == "dev"
50
- Requires-Dist: ruff<0.17,>=0.16; extra == "dev"
51
- Requires-Dist: numpy>=1.24; extra == "dev"
52
- Requires-Dist: pandas>=2.0; extra == "dev"
53
- Dynamic: license-file
38
+ Provides-Extra: scientific
39
+ License-File: LICENSE
40
+ Summary: Versioned key-value store with git-like commit, branch, and merge semantics.
41
+ Keywords: versioning,git,key-value,branching,merge
42
+ Author: ashenfad
43
+ License-Expression: MIT
44
+ Requires-Python: >=3.10
45
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
46
+ Project-URL: Bug Tracker, https://github.com/ashenfad/kvgit/issues
47
+ Project-URL: Documentation, https://github.com/ashenfad/kvgit#readme
48
+ Project-URL: Homepage, https://github.com/ashenfad/kvgit
49
+ Project-URL: Source, https://github.com/ashenfad/kvgit
54
50
 
55
51
  # kvgit 🔀
56
52
 
@@ -63,7 +59,7 @@ Git-style versioning for your data. Commits, branches, and merges -- backed by a
63
59
  | **Branches** | Cheap forks with CAS-based optimistic concurrency |
64
60
  | **Tags** | Immutable names for commits; a tagged commit outlives every branch that reached it, in every kvgit version |
65
61
  | **Three-way merge** | Auto-merges non-overlapping changes; pluggable merge fns for conflicts |
66
- | **Pluggable backends** | In-memory, disk (diskcache), PostgreSQL, IndexedDB (Pyodide/browser), or bring your own `KVStore` -- any store with an atomic conditional batch |
62
+ | **Pluggable backends** | In-memory, disk (SQLite), PostgreSQL, or bring your own `KVStore` -- any store with an atomic conditional batch |
67
63
  | **Concurrent GC** | Garbage collection runs beside live writers, from any process sharing the store |
68
64
  | **Content-addressed storage** | Equal values are stored once across keys, commits, and branches |
69
65
  | **Chunked codecs** | Optional dedup *inside* large numpy arrays and pandas DataFrames -- equal buffers (slices included) stored once |
@@ -71,11 +67,9 @@ Git-style versioning for your data. Commits, branches, and merges -- backed by a
71
67
  ## Install
72
68
 
73
69
  ```bash
74
- pip install kvgit # in-memory only
75
- pip install kvgit[disk] # adds disk backend via diskcache
70
+ pip install kvgit # in-memory and disk (SQLite)
76
71
  pip install kvgit[postgres] # adds PostgreSQL backend via psycopg
77
72
  pip install kvgit[scientific] # adds chunked codecs for numpy / pandas
78
- # IndexedDB backend is available automatically in Pyodide (browser) environments
79
73
  ```
80
74
 
81
75
  ## Quick example
@@ -144,7 +138,9 @@ with Repo(Disk("/tmp/kvgit-demo")) as on_disk:
144
138
  | `git gc [--prune=now]` | `repo.gc([min_age=0])` |
145
139
 
146
140
  Where it differs: there is no index; several worktrees can hold one
147
- branch, and their commits race and merge rather than being refused; a
141
+ branch, and their commits race and merge rather than being refused
142
+ (`commit(on_moved="raise")` refuses instead, raising
143
+ `BranchMovedError`, for data whose keys aren't independent); a
148
144
  conflicted merge raises `MergeConflict` and changes nothing (unless a
149
145
  merge function such as `text_merge` writes markers into the value);
150
146
  commit hashes are not git's, and there are no remotes.
@@ -252,9 +248,10 @@ that reads it. For a store more than one party can write, use
252
248
  `bytes`, and you choose where (if anywhere) untrusted pickles are
253
249
  loaded. `snapshot.raw` reads the stored bytes under any codec.
254
250
 
255
- The codec is fixed per store in practice: values written under one read
256
- back as that codec's bytes under another, so switching an existing
257
- store means rewriting its values.
251
+ The codec is fixed per store in practice: values written under one
252
+ codec read back as their stored bytes under `"bytes"` and generally
253
+ fail to decode under any other, so switching an existing store means
254
+ rewriting its values.
258
255
 
259
256
  ## Chunked codecs (numpy / pandas)
260
257
 
@@ -271,10 +268,10 @@ s["full"] = big
271
268
  s["head"] = big[:100_000]
272
269
  s["tail"] = big[-100_000:]
273
270
  s.commit()
274
- # All three keys reference the same chunk on disk -- ~8 MB total, not ~24 MB.
271
+ # All three keys reference the same chunk in the store -- ~8 MB total, not ~24 MB.
275
272
  ```
276
273
 
277
- Pandas DataFrames piggyback on the numpy codec via their underlying block ndarrays. See [`docs/quick-start.md`](docs/quick-start.md#storing-scientific-data-efficiently-chunked-codecs) and the [API reference](docs/api.md#chunked-codecs).
274
+ Pandas DataFrames piggyback on the numpy codec via their underlying block ndarrays. See [`docs/quick-start.md`](../docs/quick-start.md#storing-scientific-data-efficiently-chunked-codecs) and the [API reference](../docs/api.md#chunked-codecs).
278
275
 
279
276
  ## Part of the agex stack
280
277
 
@@ -282,6 +279,10 @@ kvgit provides versioned agent memory in [agex](https://github.com/ashenfad/agex
282
279
 
283
280
  ## Development
284
281
 
282
+ From the repository root. The package is in `python/` and its native
283
+ extension in `crates/py`, so building it needs a Rust toolchain
284
+ (`rustup`); uv rebuilds the extension when the Rust sources change.
285
+
285
286
  ```bash
286
287
  uv sync --extra dev
287
288
  uv run pytest
@@ -289,8 +290,9 @@ uv run pytest
289
290
 
290
291
  ## Documentation
291
292
 
292
- See [`docs/`](docs/) for detailed documentation:
293
+ See [`docs/`](../docs/) for detailed documentation:
294
+
295
+ - [Quick Start](../docs/quick-start.md) -- common patterns with runnable examples
296
+ - [API Reference](../docs/api.md) -- full reference for all classes, methods, and types
297
+ - [Storage format](../docs/storage.md) -- every key kvgit writes, shared with the TypeScript package byte for byte
293
298
 
294
- - [Quick Start](docs/quick-start.md) -- common patterns with runnable examples
295
- - [API Reference](docs/api.md) -- full reference for all classes, methods, and types
296
- - [Browser persistence (Pyodide)](docs/pyodide.md) -- choosing between the IndexedDB and OPFS-mounted-disk backends, plus the syncfs flush requirement and recommended host-side patterns
@@ -0,0 +1,11 @@
1
+ [package]
2
+ name = "kvgit-core"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ license.workspace = true
6
+ repository.workspace = true
7
+ rust-version.workspace = true
8
+ publish = false
9
+
10
+ [dependencies]
11
+ sha2 = "0.11"