kurrentdbclient 1.3.1__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.1 → kurrentdbclient-1.3.2}/PKG-INFO +53 -3
  2. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/README.md +52 -2
  3. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/__init__.py +1 -1
  4. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/pyproject.toml +1 -1
  5. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/LICENSE +0 -0
  6. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/asyncio_client.py +0 -0
  7. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/client.py +0 -0
  8. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/common.py +0 -0
  9. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/connection.py +0 -0
  10. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/connection_spec.py +0 -0
  11. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/events.py +0 -0
  12. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/exceptions.py +0 -0
  13. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/gossip.py +0 -0
  14. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/__init__.py +0 -0
  15. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/__init__.py +0 -0
  16. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/attributes.py +0 -0
  17. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/grpc.py +0 -0
  18. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/package.py +0 -0
  19. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/spanners.py +0 -0
  20. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/utils.py +0 -0
  21. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/instrumentation/opentelemetry/version.py +0 -0
  22. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/persistent.py +0 -0
  23. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/projections.py +0 -0
  24. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2.py +0 -0
  25. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2.pyi +0 -0
  26. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/google/rpc/code_pb2_grpc.py +0 -0
  27. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2.py +0 -0
  28. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2.pyi +0 -0
  29. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/errors_pb2_grpc.py +0 -0
  30. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2.py +0 -0
  31. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2.pyi +0 -0
  32. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/kurrent/rpc/rpc_pb2_grpc.py +0 -0
  33. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2.py +0 -0
  34. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2.pyi +0 -0
  35. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/cluster_pb2_grpc.py +0 -0
  36. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2.py +0 -0
  37. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2.pyi +0 -0
  38. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/gossip_pb2_grpc.py +0 -0
  39. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2.py +0 -0
  40. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2.pyi +0 -0
  41. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/persistent_pb2_grpc.py +0 -0
  42. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2.py +0 -0
  43. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2.pyi +0 -0
  44. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/projections_pb2_grpc.py +0 -0
  45. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2.py +0 -0
  46. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2.pyi +0 -0
  47. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/shared_pb2_grpc.py +0 -0
  48. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2.py +0 -0
  49. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2.pyi +0 -0
  50. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/status_pb2_grpc.py +0 -0
  51. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2.py +0 -0
  52. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2.pyi +0 -0
  53. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v1/streams_pb2_grpc.py +0 -0
  54. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2.py +0 -0
  55. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2.pyi +0 -0
  56. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/errors_pb2_grpc.py +0 -0
  57. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2.py +0 -0
  58. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2.pyi +0 -0
  59. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/protos/v2/streams/streams_pb2_grpc.py +0 -0
  60. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/py.typed +0 -0
  61. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/streams.py +0 -0
  62. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/unpack_error_status.py +0 -0
  63. {kurrentdbclient-1.3.1 → kurrentdbclient-1.3.2}/kurrentdbclient/v2streams.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kurrentdbclient
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Python gRPC Client for KurrentDB
5
5
  License: BSD-3-Clause
6
6
  License-File: LICENSE
@@ -32,7 +32,7 @@ Project-URL: Repository, https://github.com/pyeventsourcing/kurrentdbclient
32
32
  Project-URL: issues, https://github.com/pyeventsourcing/kurrentdbclient/issues
33
33
  Description-Content-Type: text/markdown
34
34
 
35
- <a href="https://kurrent.io">
35
+ from uuid import uuid4<a href="https://kurrent.io">
36
36
  <picture>
37
37
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-White.png.png">
38
38
  <source media="(prefers-color-scheme: light)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-Black.png">
@@ -93,6 +93,7 @@ https://github.com/pyeventsourcing/eventsourcing-kurrentdb) package.
93
93
  * [Append events](#append-events)
94
94
  * [Idempotent append operations](#idempotent-append-operations)
95
95
  * [Multi-stream append](#multi-stream-append)
96
+ * [Append records](#append-records)
96
97
  * [Read stream events](#read-stream-events)
97
98
  * [Get current version](#get-current-version)
98
99
  * [How to implement snapshotting with KurrentDB](#how-to-implement-snapshotting-with-kurrentdb)
@@ -1131,6 +1132,50 @@ client.multi_append_to_stream(
1131
1132
  If the `multi_append_to_stream()` operation is successful, the method returns the commit position of
1132
1133
  the last event in the last sequence.
1133
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
+
1134
1179
 
1135
1180
  ### Read stream events<a id="read-stream-events"></a>
1136
1181
 
@@ -3095,9 +3140,14 @@ This required `name` argument is a Python `str` that specifies the name of the p
3095
3140
 
3096
3141
  This required `query` argument is a Python `str` that defines what the projection will do.
3097
3142
 
3098
- This method also has four optional arguments, `emit_enabled`,
3143
+ This method also has five optional arguments, `engine`, `emit_enabled`,
3099
3144
  `track_emitted_streams`, `timeout`, and `credentials`.
3100
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
+
3101
3151
  The optional `emit_enabled` argument is a Python `bool` which specifies whether a
3102
3152
  projection will be able to emit events. If a `True` value is specified, the projection
3103
3153
  will be able to emit events, otherwise the projection will not be able to emit events.
@@ -1,4 +1,4 @@
1
- <a href="https://kurrent.io">
1
+ from uuid import uuid4<a href="https://kurrent.io">
2
2
  <picture>
3
3
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-White.png.png">
4
4
  <source media="(prefers-color-scheme: light)" srcset="https://github.com/pyeventsourcing/kurrentdbclient/raw/1.0/KurrentLogo-Black.png">
@@ -59,6 +59,7 @@ https://github.com/pyeventsourcing/eventsourcing-kurrentdb) package.
59
59
  * [Append events](#append-events)
60
60
  * [Idempotent append operations](#idempotent-append-operations)
61
61
  * [Multi-stream append](#multi-stream-append)
62
+ * [Append records](#append-records)
62
63
  * [Read stream events](#read-stream-events)
63
64
  * [Get current version](#get-current-version)
64
65
  * [How to implement snapshotting with KurrentDB](#how-to-implement-snapshotting-with-kurrentdb)
@@ -1097,6 +1098,50 @@ client.multi_append_to_stream(
1097
1098
  If the `multi_append_to_stream()` operation is successful, the method returns the commit position of
1098
1099
  the last event in the last sequence.
1099
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
+
1100
1145
 
1101
1146
  ### Read stream events<a id="read-stream-events"></a>
1102
1147
 
@@ -3061,9 +3106,14 @@ This required `name` argument is a Python `str` that specifies the name of the p
3061
3106
 
3062
3107
  This required `query` argument is a Python `str` that defines what the projection will do.
3063
3108
 
3064
- This method also has four optional arguments, `emit_enabled`,
3109
+ This method also has five optional arguments, `engine`, `emit_enabled`,
3065
3110
  `track_emitted_streams`, `timeout`, and `credentials`.
3066
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
+
3067
3117
  The optional `emit_enabled` argument is a Python `bool` which specifies whether a
3068
3118
  projection will be able to emit events. If a `True` value is specified, the projection
3069
3119
  will be able to emit events, otherwise the projection will not be able to emit events.
@@ -28,7 +28,7 @@ from kurrentdbclient.streams import (
28
28
  ReadResponse,
29
29
  )
30
30
 
31
- __version__ = "1.3.1"
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.1"
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"
File without changes