summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook.git@proton.me>2023-02-28 13:09:49 -0600
committerJordan Cook <jordan.cook.git@proton.me>2023-03-01 15:22:07 -0600
commitdc74f212ebaffdb183eb54e55a5d51e1271c671b (patch)
treed1f1c6a24ddf2c541904500fc6d98bf37960d3a2 /docs
parent048b772fa751f860ebe73e268a8719c9bc8bc35c (diff)
downloadrequests-cache-dc74f212ebaffdb183eb54e55a5d51e1271c671b.tar.gz
Update docs and screenshots for DynamoDB
Diffstat (limited to 'docs')
-rw-r--r--docs/_static/dynamodb_create_table.pngbin0 -> 51196 bytes
-rw-r--r--docs/_static/dynamodb_items.pngbin69437 -> 37675 bytes
-rw-r--r--docs/_static/dynamodb_response.pngbin124237 -> 102427 bytes
-rw-r--r--docs/user_guide/backends/dynamodb.md25
4 files changed, 19 insertions, 6 deletions
diff --git a/docs/_static/dynamodb_create_table.png b/docs/_static/dynamodb_create_table.png
new file mode 100644
index 0000000..0fcb7a0
--- /dev/null
+++ b/docs/_static/dynamodb_create_table.png
Binary files differ
diff --git a/docs/_static/dynamodb_items.png b/docs/_static/dynamodb_items.png
index 3ab4531..68066d0 100644
--- a/docs/_static/dynamodb_items.png
+++ b/docs/_static/dynamodb_items.png
Binary files differ
diff --git a/docs/_static/dynamodb_response.png b/docs/_static/dynamodb_response.png
index 9e2bae0..e0f4d85 100644
--- a/docs/_static/dynamodb_response.png
+++ b/docs/_static/dynamodb_response.png
Binary files differ
diff --git a/docs/user_guide/backends/dynamodb.md b/docs/user_guide/backends/dynamodb.md
index 7761903..85192ac 100644
--- a/docs/user_guide/backends/dynamodb.md
+++ b/docs/user_guide/backends/dynamodb.md
@@ -61,7 +61,12 @@ And here is an example response:
```
:::
-It is also possible query these responses with the [AWS CLI](https://aws.amazon.com/cli), for example:
+It is also possible query these responses with the [AWS CLI](https://aws.amazon.com/cli), for
+example:
+```bash
+aws dynamodb query --table-name http_cache > responses.json
+```
+
```bash
aws dynamodb query \
--table-name http_cache \
@@ -91,15 +96,23 @@ want to quickly test out DynamoDB as a cache backend, but in a production enviro
likely want to create the tables yourself, for example with
[CloudFormation](https://aws.amazon.com/cloudformation/) or [Terraform](https://www.terraform.io/).
-Here are the details you will need:
-
+You just need a table with a single partition key. A `value` attribute (containing response data)
+will be created dynamically once items are added to the table.
- Table: `http_cache` (or any other name, as long as it matches the `table_name` parameter for `DynamoDbCache`)
- Attributes:
- - `namespace`: String
- `key`: String
- Keys:
- - Partition key (aka namespace): `namespace`
- - Range key (aka sort key): `key`
+ - Partition key (aka hash key): `key`
+
+Example of manually creating a table in the console:
+:::{dropdown} Screenshot
+:animate: fade-in-slide-down
+:color: primary
+:icon: file-media
+
+```{image} ../../_static/dynamodb_create_table.png
+```
+:::
### Example CloudFormation Template
:::{dropdown} Example