kurrentdbclient 1.3.0__tar.gz → 1.3.2__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 (63) hide show
  1. kurrentdbclient-1.3.0/README.md → kurrentdbclient-1.3.2/PKG-INFO +87 -2
  2. kurrentdbclient-1.3.0/PKG-INFO → kurrentdbclient-1.3.2/README.md +52 -33
  3. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/__init__.py +1 -1
  4. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/pyproject.toml +5 -2
  5. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/LICENSE +0 -0
  6. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/asyncio_client.py +0 -0
  7. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/client.py +0 -0
  8. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/common.py +0 -0
  9. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/connection.py +0 -0
  10. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/connection_spec.py +0 -0
  11. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/events.py +0 -0
  12. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/exceptions.py +0 -0
  13. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/gossip.py +0 -0
  14. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/__init__.py +0 -0
  15. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/__init__.py +0 -0
  16. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/attributes.py +0 -0
  17. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/grpc.py +0 -0
  18. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/package.py +0 -0
  19. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/spanners.py +0 -0
  20. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/utils.py +0 -0
  21. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/version.py +0 -0
  22. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/persistent.py +0 -0
  23. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/projections.py +0 -0
  24. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2.py +0 -0
  25. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2.pyi +0 -0
  26. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2_grpc.py +0 -0
  27. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2.py +0 -0
  28. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2.pyi +0 -0
  29. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2_grpc.py +0 -0
  30. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2.py +0 -0
  31. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2.pyi +0 -0
  32. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2_grpc.py +0 -0
  33. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2.py +0 -0
  34. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2.pyi +0 -0
  35. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2_grpc.py +0 -0
  36. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2.py +0 -0
  37. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2.pyi +0 -0
  38. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2_grpc.py +0 -0
  39. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2.py +0 -0
  40. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2.pyi +0 -0
  41. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2_grpc.py +0 -0
  42. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2.py +0 -0
  43. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2.pyi +0 -0
  44. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2_grpc.py +0 -0
  45. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2.py +0 -0
  46. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2.pyi +0 -0
  47. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2_grpc.py +0 -0
  48. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2.py +0 -0
  49. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2.pyi +0 -0
  50. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2_grpc.py +0 -0
  51. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2.py +0 -0
  52. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2.pyi +0 -0
  53. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2_grpc.py +0 -0
  54. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2.py +0 -0
  55. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2.pyi +0 -0
  56. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2_grpc.py +0 -0
  57. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2.py +0 -0
  58. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2.pyi +0 -0
  59. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2_grpc.py +0 -0
  60. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/py.typed +0 -0
  61. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/streams.py +0 -0
  62. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/unpack_error_status.py +0 -0
  63. {kurrentdbclient-1.3.0 → kurrentdbclient-1.3.2}/kurrentdbclient/v2streams.py +0 -0
@@ -1,4 +1,38 @@
1
- <a href="https://kurrent.io">
1
+ Metadata-Version: 2.4
2
+ Name: kurrentdbclient
3
+ Version: 1.3.2
4
+ Summary: Python gRPC Client for KurrentDB
5
+ License: BSD-3-Clause
6
+ License-File: LICENSE
7
+ Author: John Bywater
8
+ Author-email: john.bywater@appropriatesoftware.net
9
+ Requires-Python: >=3.10
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python
20
+ Classifier: Topic :: Database
21
+ Classifier: Topic :: Database :: Front-Ends
22
+ Provides-Extra: opentelemetry
23
+ Requires-Dist: googleapis-common-protos
24
+ Requires-Dist: grpcio-status
25
+ Requires-Dist: grpcio[protobuf] (>=1.80.0,<2.0)
26
+ Requires-Dist: opentelemetry-api (>=1.28.0,<2.0) ; extra == "opentelemetry"
27
+ Requires-Dist: opentelemetry-instrumentation (>=0.62b1) ; extra == "opentelemetry"
28
+ Requires-Dist: opentelemetry-semantic-conventions (>=0.62b1) ; extra == "opentelemetry"
29
+ Requires-Dist: typing_extensions
30
+ Project-URL: Homepage, https://github.com/pyeventsourcing/kurrentdbclient
31
+ Project-URL: Repository, https://github.com/pyeventsourcing/kurrentdbclient
32
+ Project-URL: issues, https://github.com/pyeventsourcing/kurrentdbclient/issues
33
+ Description-Content-Type: text/markdown
34
+
35
+ from uuid import uuid4<a href="https://kurrent.io">
2
36
  <picture>
3
37
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-White.png.png">
4
38
  <source media="(prefers-color-scheme: light)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-Black.png">
@@ -59,6 +93,7 @@ https://github.com/pyeventsourcing/eventsourcing-kurrentdb) package.
59
93
  * [Append events](#append-events)
60
94
  * [Idempotent append operations](#idempotent-append-operations)
61
95
  * [Multi-stream append](#multi-stream-append)
96
+ * [Append records](#append-records)
62
97
  * [Read stream events](#read-stream-events)
63
98
  * [Get current version](#get-current-version)
64
99
  * [How to implement snapshotting with KurrentDB](#how-to-implement-snapshotting-with-kurrentdb)
@@ -1097,6 +1132,50 @@ client.multi_append_to_stream(
1097
1132
  If the `multi_append_to_stream()` operation is successful, the method returns the commit position of
1098
1133
  the last event in the last sequence.
1099
1134
 
1135
+ ### Append records<a id="append-records"></a>
1136
+
1137
+ *requires leader*
1138
+
1139
+ *supported by KurrentDB 26.1*
1140
+
1141
+ The `append_records()` method can be used to record many events to a different streams
1142
+ in any order. The `append_records()` operation is atomic, so that
1143
+ either all or none of the new events will be recorded.
1144
+
1145
+ The `append_records()` method has one required argument, `records`, which can be either a single
1146
+ instance of `NewRecord` or an iterable of `NewRecord` instances.
1147
+
1148
+ The `append_records()` method has an optional `checks` argument, which is an iterable of
1149
+ `StreamStateCheck` objects.
1150
+
1151
+ The `append_records()` method has an optional `timeout` argument, which is a Python `float`
1152
+ that sets a maximum duration, in seconds, for the completion of the gRPC operation.
1153
+
1154
+ The `append_records()` method has an optional `credentials` argument, which can be used to
1155
+ override call credentials derived from the connection string URI.
1156
+
1157
+ ```python
1158
+ from kurrentdbclient import NewRecord, StreamStateCheck
1159
+
1160
+ stream_name = str(uuid.uuid4())
1161
+
1162
+ client.append_records(
1163
+ records=[
1164
+ NewRecord(
1165
+ stream_name=stream_name,
1166
+ type='EventType1',
1167
+ data=b'{}'
1168
+ ),
1169
+ ],
1170
+ checks=[
1171
+ StreamStateCheck(
1172
+ stream_name=stream_name,
1173
+ expected_state=StreamState.NO_STREAM,
1174
+ ),
1175
+ ],
1176
+ )
1177
+ ```
1178
+
1100
1179
 
1101
1180
  ### Read stream events<a id="read-stream-events"></a>
1102
1181
 
@@ -3061,9 +3140,14 @@ This required `name` argument is a Python `str` that specifies the name of the p
3061
3140
 
3062
3141
  This required `query` argument is a Python `str` that defines what the projection will do.
3063
3142
 
3064
- This method also has four optional arguments, `emit_enabled`,
3143
+ This method also has five optional arguments, `engine`, `emit_enabled`,
3065
3144
  `track_emitted_streams`, `timeout`, and `credentials`.
3066
3145
 
3146
+ The optional `engine` argument is a Python `str` which specifies whether a
3147
+ projection will use version 1 or version 2 of the projections engine. If the
3148
+ argument is `"v2"`, the version 2 projection engine will be used, which is more
3149
+ reliable than the version 1 projection engine. The default value of `engine` is `v1`.
3150
+
3067
3151
  The optional `emit_enabled` argument is a Python `bool` which specifies whether a
3068
3152
  projection will be able to emit events. If a `True` value is specified, the projection
3069
3153
  will be able to emit events, otherwise the projection will not be able to emit events.
@@ -3926,3 +4010,4 @@ the project's virtual environment, with the following command.
3926
4010
  $ make update
3927
4011
 
3928
4012
  Before pushing changes to the repo or a PR, please run `make lint test`.
4013
+
@@ -1,34 +1,4 @@
1
- Metadata-Version: 2.4
2
- Name: kurrentdbclient
3
- Version: 1.3.0
4
- Summary: Python gRPC Client for KurrentDB
5
- License: BSD-3-Clause
6
- License-File: LICENSE
7
- Author: John Bywater
8
- Author-email: john.bywater@appropriatesoftware.net
9
- Requires-Python: >=3.10
10
- Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: License :: OSI Approved :: BSD License
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Programming Language :: Python :: 3.13
17
- Classifier: Programming Language :: Python :: 3.14
18
- Classifier: Programming Language :: Python
19
- Provides-Extra: opentelemetry
20
- Requires-Dist: googleapis-common-protos
21
- Requires-Dist: grpcio-status
22
- Requires-Dist: grpcio[protobuf] (>=1.80.0,<2.0)
23
- Requires-Dist: opentelemetry-api (>=1.28.0,<2.0) ; extra == "opentelemetry"
24
- Requires-Dist: opentelemetry-instrumentation (>=0.62b1) ; extra == "opentelemetry"
25
- Requires-Dist: opentelemetry-semantic-conventions (>=0.62b1) ; extra == "opentelemetry"
26
- Requires-Dist: typing_extensions
27
- Project-URL: Homepage, https://github.com/pyeventsourcing/kurrentdbclient
28
- Project-URL: Repository, https://github.com/pyeventsourcing/kurrentdbclient
29
- Description-Content-Type: text/markdown
30
-
31
- <a href="https://kurrent.io">
1
+ from uuid import uuid4<a href="https://kurrent.io">
32
2
  <picture>
33
3
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-White.png.png">
34
4
  <source media="(prefers-color-scheme: light)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-Black.png">
@@ -89,6 +59,7 @@ https://github.com/pyeventsourcing/eventsourcing-kurrentdb) package.
89
59
  * [Append events](#append-events)
90
60
  * [Idempotent append operations](#idempotent-append-operations)
91
61
  * [Multi-stream append](#multi-stream-append)
62
+ * [Append records](#append-records)
92
63
  * [Read stream events](#read-stream-events)
93
64
  * [Get current version](#get-current-version)
94
65
  * [How to implement snapshotting with KurrentDB](#how-to-implement-snapshotting-with-kurrentdb)
@@ -1127,6 +1098,50 @@ client.multi_append_to_stream(
1127
1098
  If the `multi_append_to_stream()` operation is successful, the method returns the commit position of
1128
1099
  the last event in the last sequence.
1129
1100
 
1101
+ ### Append records<a id="append-records"></a>
1102
+
1103
+ *requires leader*
1104
+
1105
+ *supported by KurrentDB 26.1*
1106
+
1107
+ The `append_records()` method can be used to record many events to a different streams
1108
+ in any order. The `append_records()` operation is atomic, so that
1109
+ either all or none of the new events will be recorded.
1110
+
1111
+ The `append_records()` method has one required argument, `records`, which can be either a single
1112
+ instance of `NewRecord` or an iterable of `NewRecord` instances.
1113
+
1114
+ The `append_records()` method has an optional `checks` argument, which is an iterable of
1115
+ `StreamStateCheck` objects.
1116
+
1117
+ The `append_records()` method has an optional `timeout` argument, which is a Python `float`
1118
+ that sets a maximum duration, in seconds, for the completion of the gRPC operation.
1119
+
1120
+ The `append_records()` method has an optional `credentials` argument, which can be used to
1121
+ override call credentials derived from the connection string URI.
1122
+
1123
+ ```python
1124
+ from kurrentdbclient import NewRecord, StreamStateCheck
1125
+
1126
+ stream_name = str(uuid.uuid4())
1127
+
1128
+ client.append_records(
1129
+ records=[
1130
+ NewRecord(
1131
+ stream_name=stream_name,
1132
+ type='EventType1',
1133
+ data=b'{}'
1134
+ ),
1135
+ ],
1136
+ checks=[
1137
+ StreamStateCheck(
1138
+ stream_name=stream_name,
1139
+ expected_state=StreamState.NO_STREAM,
1140
+ ),
1141
+ ],
1142
+ )
1143
+ ```
1144
+
1130
1145
 
1131
1146
  ### Read stream events<a id="read-stream-events"></a>
1132
1147
 
@@ -3091,9 +3106,14 @@ This required `name` argument is a Python `str` that specifies the name of the p
3091
3106
 
3092
3107
  This required `query` argument is a Python `str` that defines what the projection will do.
3093
3108
 
3094
- This method also has four optional arguments, `emit_enabled`,
3109
+ This method also has five optional arguments, `engine`, `emit_enabled`,
3095
3110
  `track_emitted_streams`, `timeout`, and `credentials`.
3096
3111
 
3112
+ The optional `engine` argument is a Python `str` which specifies whether a
3113
+ projection will use version 1 or version 2 of the projections engine. If the
3114
+ argument is `"v2"`, the version 2 projection engine will be used, which is more
3115
+ reliable than the version 1 projection engine. The default value of `engine` is `v1`.
3116
+
3097
3117
  The optional `emit_enabled` argument is a Python `bool` which specifies whether a
3098
3118
  projection will be able to emit events. If a `True` value is specified, the projection
3099
3119
  will be able to emit events, otherwise the projection will not be able to emit events.
@@ -3956,4 +3976,3 @@ the project's virtual environment, with the following command.
3956
3976
  $ make update
3957
3977
 
3958
3978
  Before pushing changes to the repo or a PR, please run `make lint test`.
3959
-
@@ -28,7 +28,7 @@ from kurrentdbclient.streams import (
28
28
  ReadResponse,
29
29
  )
30
30
 
31
- __version__ = "1.3.0"
31
+ __version__ = "1.3.2"
32
32
 
33
33
  __all__ = [
34
34
  "DEFAULT_EXCLUDE_FILTER",
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "kurrentdbclient"
7
- version = "1.3.0"
7
+ version = "1.3.2"
8
8
  description = "Python gRPC Client for KurrentDB"
9
9
  license = { text = "BSD-3-Clause" }
10
10
  readme = "README.md"
@@ -17,6 +17,7 @@ classifiers = [
17
17
  # "Development Status :: 4 - Beta",
18
18
  "Development Status :: 5 - Production/Stable",
19
19
  "License :: OSI Approved :: BSD License",
20
+ "Operating System :: OS Independent",
20
21
  "Programming Language :: Python :: 3",
21
22
  "Programming Language :: Python :: 3.10",
22
23
  "Programming Language :: Python :: 3.11",
@@ -24,7 +25,8 @@ classifiers = [
24
25
  "Programming Language :: Python :: 3.13",
25
26
  "Programming Language :: Python :: 3.14",
26
27
  "Programming Language :: Python",
27
- ]
28
+ "Topic :: Database",
29
+ "Topic :: Database :: Front-Ends",]
28
30
  dependencies = [
29
31
  "grpcio[protobuf]>=1.80.0,<2.0",
30
32
  "typing_extensions",
@@ -42,6 +44,7 @@ opentelemetry = [
42
44
  [project.urls]
43
45
  homepage = "https://github.com/pyeventsourcing/kurrentdbclient"
44
46
  repository = "https://github.com/pyeventsourcing/kurrentdbclient"
47
+ issues = "https://github.com/pyeventsourcing/kurrentdbclient/issues"
45
48
 
46
49
  [tool.poetry]
47
50
  include = ["kurrentdbclient/py.typed"]
File without changes