dynamoxy 0.5.0__tar.gz → 0.5.1__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.
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/Cargo.lock +2 -2
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/Cargo.toml +2 -2
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/PKG-INFO +1 -1
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/src/client.rs +107 -43
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/src/convert.rs +384 -102
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/src/errors.rs +19 -18
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/src/lib.rs +9 -10
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/src/runtime.rs +158 -42
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/AGENT_GUIDE.md +59 -7
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/__init__.py +3 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/_pydantic.py +33 -4
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/errors.py +30 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/models.py +156 -46
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/query.py +137 -16
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/repository.py +107 -37
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/schema.py +166 -23
- dynamoxy-0.5.1/python/dynamoxy/streams.py +469 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/LICENSE +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/README.md +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/Cargo.toml +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/README.md +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/aws/convert.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/aws/errors.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/aws/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/admin.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/batch.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/items.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/partiql.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/query.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/table.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/tests.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/memory/transact.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/backend/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/client/tests.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/client.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/config.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/error.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/events.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/ast.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/eval.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/parser.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/projection.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/reserved.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/tests.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/expr/update.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/lib.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/metrics.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/retry.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/types/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/types/ops.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/types/schema.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/value/mod.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/value/number.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/src/value/size.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-core/tests/emulator.rs +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/crates/dynamoxy-py/Cargo.toml +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/pyproject.toml +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/__main__.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/_core.pyi +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/_utils.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/attributes.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/batch.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/client.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/codecs.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/collection.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/constraints.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/events.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/expressions.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/middleware.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/py.typed +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/results.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/table.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/telemetry.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/testing.py +0 -0
- {dynamoxy-0.5.0 → dynamoxy-0.5.1}/python/dynamoxy/transactions.py +0 -0
|
@@ -658,7 +658,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
|
|
658
658
|
|
|
659
659
|
[[package]]
|
|
660
660
|
name = "dynamoxy-core"
|
|
661
|
-
version = "0.5.
|
|
661
|
+
version = "0.5.1"
|
|
662
662
|
dependencies = [
|
|
663
663
|
"async-trait",
|
|
664
664
|
"aws-config",
|
|
@@ -675,7 +675,7 @@ dependencies = [
|
|
|
675
675
|
|
|
676
676
|
[[package]]
|
|
677
677
|
name = "dynamoxy-py"
|
|
678
|
-
version = "0.5.
|
|
678
|
+
version = "0.5.1"
|
|
679
679
|
dependencies = [
|
|
680
680
|
"dynamoxy-core",
|
|
681
681
|
"parking_lot",
|
|
@@ -4,7 +4,7 @@ members = ["crates/dynamoxy-core", "crates/dynamoxy-py"]
|
|
|
4
4
|
|
|
5
5
|
# The single version of the project: the Python package takes it from the binding crate.
|
|
6
6
|
[workspace.package]
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.1"
|
|
8
8
|
edition = "2024"
|
|
9
9
|
rust-version = "1.99"
|
|
10
10
|
license = "MIT"
|
|
@@ -13,7 +13,7 @@ homepage = "https://github.com/kalaspuff/dynamoxy"
|
|
|
13
13
|
authors = ["Carl Oscar Aaro <hello@carloscar.com>"]
|
|
14
14
|
|
|
15
15
|
[workspace.dependencies]
|
|
16
|
-
dynamoxy-core = { path = "crates/dynamoxy-core", version = "0.5.
|
|
16
|
+
dynamoxy-core = { path = "crates/dynamoxy-core", version = "0.5.1" }
|
|
17
17
|
async-trait = "0.1"
|
|
18
18
|
aws-config = { version = "1.12", features = ["behavior-version-latest"] }
|
|
19
19
|
aws-credential-types = { version = "1.3", features = ["hardcoded-credentials"] }
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
use std::collections::BTreeMap;
|
|
9
9
|
use std::future::Future;
|
|
10
|
-
use std::time::Duration;
|
|
10
|
+
use std::time::{Duration, Instant};
|
|
11
11
|
|
|
12
12
|
use dynamoxy_core::backend::memory::{Fault, FaultKind, MemoryBackend};
|
|
13
13
|
use dynamoxy_core::events::{Event, EventKind};
|
|
14
14
|
use dynamoxy_core::metrics::LATENCY_BUCKETS_MS;
|
|
15
15
|
use dynamoxy_core::types::*;
|
|
16
|
-
use dynamoxy_core::{Call, Client, ClientConfig};
|
|
16
|
+
use dynamoxy_core::{Call, Client, ClientConfig, Item};
|
|
17
17
|
use pyo3::IntoPyObjectExt;
|
|
18
18
|
use pyo3::exceptions::PyTypeError;
|
|
19
19
|
use pyo3::intern;
|
|
@@ -22,9 +22,9 @@ use pyo3::types::{PyDict, PyList, PyString};
|
|
|
22
22
|
use pythonize::depythonize;
|
|
23
23
|
|
|
24
24
|
use crate::convert::{
|
|
25
|
-
PyItem, PyStrMap, PyValueList, PyValues, as_dict, backup_description, backup_details, backup_summary,
|
|
26
|
-
collection_metrics, collection_metrics_map, continuous_backups,
|
|
27
|
-
|
|
25
|
+
ItemsInSteps, PyItem, PyStrMap, PyValueList, PyValues, as_dict, backup_description, backup_details, backup_summary,
|
|
26
|
+
capacities, collection_metrics, collection_metrics_map, continuous_backups, keys_and_attributes, optional_capacity,
|
|
27
|
+
optional_item, py_to_item, stats, table_description, ttl_to_py, write_request_to_py,
|
|
28
28
|
};
|
|
29
29
|
use crate::errors::{ConfigurationError, ShutdownError, ValidationError, call_error_in, error_in, to_py_err};
|
|
30
30
|
use crate::runtime::{Deferred, future_into_py, future_into_py_in, future_into_py_inline};
|
|
@@ -75,6 +75,32 @@ fn finish<T: Send + 'static>(
|
|
|
75
75
|
})
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/// [`finish`] for outputs that hold lists of items: `lists` takes them out of the output, and
|
|
79
|
+
/// they are converted in steps (see [`Deferred::in_steps`]) before `convert` builds the rest
|
|
80
|
+
/// with the converted lists, in the same order.
|
|
81
|
+
fn finish_in_steps<T: Send + 'static>(
|
|
82
|
+
call: Call<T>,
|
|
83
|
+
lists: impl FnOnce(&mut T) -> Vec<Vec<Item>>,
|
|
84
|
+
convert: impl for<'py> FnOnce(Python<'py>, Vec<Bound<'py, PyList>>, T) -> PyResult<Py<PyAny>> + Send + 'static,
|
|
85
|
+
) -> Deferred {
|
|
86
|
+
let call_stats = call.stats;
|
|
87
|
+
let mut output = match call.result {
|
|
88
|
+
Ok(output) => output,
|
|
89
|
+
Err(error) => return Deferred::new(move |py| Err(call_error_in(py, error, &call_stats))),
|
|
90
|
+
};
|
|
91
|
+
let mut items = ItemsInSteps::new(lists(&mut output));
|
|
92
|
+
let mut rest = Some((output, convert));
|
|
93
|
+
Deferred::in_steps(move |py: Python<'_>, deadline: Instant| {
|
|
94
|
+
let lists = match items.step(py, deadline) {
|
|
95
|
+
Ok(Some(lists)) => lists,
|
|
96
|
+
Ok(None) => return None,
|
|
97
|
+
Err(error) => return Some(Err(error)),
|
|
98
|
+
};
|
|
99
|
+
let (output, convert) = rest.take()?;
|
|
100
|
+
Some(convert(py, lists, output).and_then(|value| (value, stats(&call_stats)).into_py_any(py)))
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
78
104
|
/// The error that left requests of a managed batch unprocessed, as an exception object, or `None`.
|
|
79
105
|
fn batch_error(py: Python<'_>, error: Option<dynamoxy_core::Error>) -> Bound<'_, PyAny> {
|
|
80
106
|
match error {
|
|
@@ -103,11 +129,17 @@ fn write_output(py: Python<'_>, output: WriteItemOutput) -> PyResult<Py<PyAny>>
|
|
|
103
129
|
)
|
|
104
130
|
}
|
|
105
131
|
|
|
106
|
-
|
|
132
|
+
/// A `Query` or `Scan` page, its items converted in steps.
|
|
133
|
+
fn finish_query(call: Call<QueryOutput>) -> Deferred {
|
|
134
|
+
finish_in_steps(call, |output| vec![std::mem::take(&mut output.items)], query_output)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
fn query_output(py: Python<'_>, mut lists: Vec<Bound<'_, PyList>>, output: QueryOutput) -> PyResult<Py<PyAny>> {
|
|
138
|
+
let items = lists.pop().unwrap_or_else(|| PyList::empty(py));
|
|
107
139
|
dict(
|
|
108
140
|
py,
|
|
109
141
|
&[
|
|
110
|
-
(intern!(py, "items"),
|
|
142
|
+
(intern!(py, "items"), items.into_any()),
|
|
111
143
|
(intern!(py, "count"), output.count.into_pyobject(py)?.into_any()),
|
|
112
144
|
(intern!(py, "scanned_count"), output.scanned_count.into_pyobject(py)?.into_any()),
|
|
113
145
|
(intern!(py, "last_evaluated_key"), optional_item(py, output.last_evaluated_key.as_ref())?),
|
|
@@ -326,11 +358,26 @@ fn write_request(kind: &str, item: &Bound<'_, PyAny>) -> PyResult<WriteRequest>
|
|
|
326
358
|
}
|
|
327
359
|
}
|
|
328
360
|
|
|
329
|
-
|
|
361
|
+
/// The items of each table of a `BatchGetItem` answer, taken out (to convert in steps).
|
|
362
|
+
fn take_responses(responses: &mut BTreeMap<String, Vec<Item>>) -> Vec<Vec<Item>> {
|
|
363
|
+
responses.values_mut().map(std::mem::take).collect()
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/// Tables with their converted items (in the order of [`take_responses`]).
|
|
367
|
+
fn responses_dict<'py>(
|
|
368
|
+
py: Python<'py>,
|
|
369
|
+
tables: &BTreeMap<String, Vec<Item>>,
|
|
370
|
+
lists: Vec<Bound<'py, PyList>>,
|
|
371
|
+
) -> PyResult<Bound<'py, PyDict>> {
|
|
330
372
|
let responses = PyDict::new(py);
|
|
331
|
-
for (table, items) in
|
|
332
|
-
responses.set_item(table,
|
|
373
|
+
for (table, items) in tables.keys().zip(lists) {
|
|
374
|
+
responses.set_item(table, items)?;
|
|
333
375
|
}
|
|
376
|
+
Ok(responses)
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
fn batch_get_output(py: Python<'_>, lists: Vec<Bound<'_, PyList>>, output: BatchGetItemOutput) -> PyResult<Py<PyAny>> {
|
|
380
|
+
let responses = responses_dict(py, &output.responses, lists)?;
|
|
334
381
|
let unprocessed = PyDict::new(py);
|
|
335
382
|
for (table, keys) in &output.unprocessed_keys {
|
|
336
383
|
unprocessed.set_item(table, keys_and_attributes(py, keys)?)?;
|
|
@@ -705,7 +752,7 @@ impl PyCoreClient {
|
|
|
705
752
|
"return_consumed_capacity"
|
|
706
753
|
)?,
|
|
707
754
|
};
|
|
708
|
-
self.run(py, async move {
|
|
755
|
+
self.run(py, async move { finish_query(client.query(input).await) })
|
|
709
756
|
}
|
|
710
757
|
|
|
711
758
|
/// `Scan` (one page).
|
|
@@ -748,7 +795,7 @@ impl PyCoreClient {
|
|
|
748
795
|
"return_consumed_capacity"
|
|
749
796
|
)?,
|
|
750
797
|
};
|
|
751
|
-
self.run(py, async move {
|
|
798
|
+
self.run(py, async move { finish_query(client.scan(input).await) })
|
|
752
799
|
}
|
|
753
800
|
|
|
754
801
|
/// `BatchGetItem`: one request (at most 100 keys). See `batch_get` for any number of keys.
|
|
@@ -771,7 +818,13 @@ impl PyCoreClient {
|
|
|
771
818
|
"return_consumed_capacity"
|
|
772
819
|
)?,
|
|
773
820
|
};
|
|
774
|
-
self.run(py, async move {
|
|
821
|
+
self.run(py, async move {
|
|
822
|
+
finish_in_steps(
|
|
823
|
+
client.batch_get_item(input).await,
|
|
824
|
+
|output| take_responses(&mut output.responses),
|
|
825
|
+
batch_get_output,
|
|
826
|
+
)
|
|
827
|
+
})
|
|
775
828
|
}
|
|
776
829
|
|
|
777
830
|
/// `BatchWriteItem`: one request (at most 25 writes) of `("put", item)` / `("delete", key)`
|
|
@@ -843,25 +896,27 @@ impl PyCoreClient {
|
|
|
843
896
|
let request_items = request_items.into_iter().map(|(table, keys)| (table, keys.into_core())).collect();
|
|
844
897
|
let capacity = constant!(return_consumed_capacity, ReturnConsumedCapacity, "return_consumed_capacity")?;
|
|
845
898
|
self.run(py, async move {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
899
|
+
let output = client.batch_get(request_items, capacity).await;
|
|
900
|
+
finish_in_steps(
|
|
901
|
+
output,
|
|
902
|
+
|output| take_responses(&mut output.items),
|
|
903
|
+
|py, lists, output| {
|
|
904
|
+
let items = responses_dict(py, &output.items, lists)?;
|
|
905
|
+
let unprocessed = PyDict::new(py);
|
|
906
|
+
for (table, keys) in &output.unprocessed {
|
|
907
|
+
unprocessed.set_item(table, keys_and_attributes(py, keys)?)?;
|
|
908
|
+
}
|
|
909
|
+
dict(
|
|
910
|
+
py,
|
|
911
|
+
&[
|
|
912
|
+
(intern!(py, "items"), items.into_any()),
|
|
913
|
+
(intern!(py, "unprocessed_keys"), unprocessed.into_any()),
|
|
914
|
+
(intern!(py, "consumed_capacity"), capacities(py, &output.consumed_capacity)?.into_any()),
|
|
915
|
+
(intern!(py, "error"), batch_error(py, output.error)),
|
|
916
|
+
],
|
|
917
|
+
)
|
|
918
|
+
},
|
|
919
|
+
)
|
|
865
920
|
})
|
|
866
921
|
}
|
|
867
922
|
|
|
@@ -1016,17 +1071,26 @@ impl PyCoreClient {
|
|
|
1016
1071
|
)?,
|
|
1017
1072
|
};
|
|
1018
1073
|
self.run(py, async move {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1074
|
+
let output = client.execute_statement(input).await;
|
|
1075
|
+
finish_in_steps(
|
|
1076
|
+
output,
|
|
1077
|
+
|output| vec![std::mem::take(&mut output.items)],
|
|
1078
|
+
|py, mut lists, output| {
|
|
1079
|
+
let items = lists.pop().unwrap_or_else(|| PyList::empty(py));
|
|
1080
|
+
dict(
|
|
1081
|
+
py,
|
|
1082
|
+
&[
|
|
1083
|
+
(intern!(py, "items"), items.into_any()),
|
|
1084
|
+
(intern!(py, "next_token"), output.next_token.into_pyobject(py)?.into_any()),
|
|
1085
|
+
(intern!(py, "last_evaluated_key"), optional_item(py, output.last_evaluated_key.as_ref())?),
|
|
1086
|
+
(
|
|
1087
|
+
intern!(py, "consumed_capacity"),
|
|
1088
|
+
optional_capacity(py, output.consumed_capacity.as_ref())?,
|
|
1089
|
+
),
|
|
1090
|
+
],
|
|
1091
|
+
)
|
|
1092
|
+
},
|
|
1093
|
+
)
|
|
1030
1094
|
})
|
|
1031
1095
|
}
|
|
1032
1096
|
|