You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.template.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@
4
4
5
5
The Momento Python SDK package is available on pypi: [momento](https://pypi.org/project/momento/).
6
6
7
-
## Usage
7
+
## Prerequisites
8
+
9
+
- A Momento API key is required, you can generate one using the [Momento Console](https://console.gomomento.com/api-keys)
10
+
- A Momento service endpoint is required. You can find a [list of them here](https://docs.momentohq.com/platform/regions)
8
11
9
-
The examples below require an environment variable named `MOMENTO_API_KEY` which must
10
-
be set to a valid Momento API key. You can get one from the [Momento Console](https://console.gomomento.com).
12
+
## Usage
11
13
12
14
Python 3.10 introduced the `match` statement, which allows for [structural pattern matching on objects](https://peps.python.org/pep-0636/#adding-a-ui-matching-objects).
13
15
If you are running python 3.10 or greater, here is a quickstart you can use in your own project:
@@ -32,8 +34,8 @@ Documentation is available on the [Momento Docs website](https://docs.momentohq.
32
34
Working example projects, with all required build configuration files, are available for both Python 3.10 and up
Copy file name to clipboardExpand all lines: examples/lambda/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ The primary use is to provide a base for testing Momento in an AWS lambda enviro
17
17
## Prerequisites
18
18
19
19
- Node version 14 or higher is required (for deploying the Cloudformation stack containing the Lambda)
20
-
- To get started with Momento you will need a Momento Auth Token. You can get one from the [Momento Console](https://console.gomomento.com). Check out the [getting started](https://docs.momentohq.com/getting-started) guide for more information on obtaining an auth token.
20
+
- A Momento API key is required, you can generate one using the [Momento Console](https://console.gomomento.com/api-keys)
21
+
- A Momento service endpoint is required. You can find a [list of them here](https://docs.momentohq.com/platform/regions)
21
22
22
23
## Deploying the Momento Python Lambda with Docker and AWS CDK
23
24
@@ -31,12 +32,11 @@ npm install
31
32
32
33
To deploy the CDK app you will need to have [configured your AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html#cli-chap-authentication-precedence).
33
34
34
-
You will also need a superuser token generated from the [Momento Console](https://console.gomomento.com).
35
-
36
35
Then run:
37
36
38
37
```
39
-
export MOMENTO_API_KEY=<YOUR_MOMENTO_API_KEY>
38
+
export MOMENTO_API_KEY=<your-api-key>
39
+
export MOMENTO_ENDPOINT=<your-endpoint>
40
40
npm run cdk deploy
41
41
```
42
42
@@ -63,4 +63,5 @@ Follow these steps to create the zip and deploy it to AWS Lambda using the AWS M
63
63
8. Under "Runtime settings", set the Handler to index.handler.
64
64
9. Switch to the "Configuration" tab.
65
65
10. Set the environment variable `MOMENTO_API_KEY` to your API key.
66
-
11. Finally, go to the "Test" tab to test your Lambda function.
66
+
11. Set the environment variable `MOMENTO_ENDPOINT` to your chosen endpoint.
67
+
12. Finally, go to the "Test" tab to test your Lambda function.
0 commit comments