@@ -9,6 +9,7 @@ _Read this in other languages_: [日本語](README.ja.md)
99
1010- [ Python 3.7 or above is required] ( https://www.python.org/downloads/ )
1111- To get started with Momento you will need a Momento API key. You can get one from the [ Momento Console] ( https://console.gomomento.com ) .
12+ - A Momento service endpoint is required. You can find a [ list of them here] ( https://docs.momentohq.com/platform/regions )
1213- Developer libraries (gcc/python dev headers) installed on machine you intend to run on
1314
1415** Amazon Linux**
@@ -44,29 +45,29 @@ poetry install
4445To run the python version 3.10+ examples:
4546
4647``` bash
47- MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m py310.example
48- MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m py310.example_async
48+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m py310.example
49+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m py310.example_async
4950```
5051
5152To run the examples with SDK debug logging enabled:
5253
5354``` bash
54- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m py310.example
55- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m py310.example_async
55+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m py310.example
56+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m py310.example_async
5657```
5758
5859To run the python version <3.10 examples:
5960
6061``` bash
61- MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m prepy310.example
62- MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m prepy310.example_async
62+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m prepy310.example
63+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m prepy310.example_async
6364```
6465
6566To run the examples with SDK debug logging enabled:
6667
6768``` bash
68- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m prepy310.example
69- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> poetry run python -m prepy310.example_async
69+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m prepy310.example
70+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m prepy310.example_async
7071```
7172
7273## Running the Example Using pip
@@ -80,29 +81,29 @@ pip install -r requirements.txt
8081To run the python version 3.10+ examples:
8182
8283``` bash
83- MOMENTO_API_KEY=< YOUR_API_KEY> python -m py310.example
84- MOMENTO_API_KEY=< YOUR_API_KEY> python -m py310.example_async
84+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m py310.example
85+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m py310.example_async
8586```
8687
8788To run the examples with SDK debug logging enabled:
8889
8990``` bash
90- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> python -m py310.example
91- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> python -m py310.example_async
91+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m py310.example
92+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m py310.example_async
9293```
9394
9495To run the python version <3.10 examples:
9596
9697``` bash
97- MOMENTO_API_KEY=< YOUR_API_KEY> python -m prepy310.example
98- MOMENTO_API_KEY=< YOUR_API_KEY> python -m prepy310.example_async
98+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m prepy310.example
99+ MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m prepy310.example_async
99100```
100101
101102To run the examples with SDK debug logging enabled:
102103
103104``` bash
104- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> python -m prepy310.example
105- DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> python -m prepy310.example_async
105+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m prepy310.example
106+ DEBUG=true MOMENTO_API_KEY=< YOUR_API_KEY> MOMENTO_ENDPOINT= < YOUR_ENDPOINT > python -m prepy310.example_async
106107```
107108
108109## Running the load generator example
@@ -135,7 +136,7 @@ To run the load generator:
135136
136137``` bash
137138# Run example load generator
138- MOMENTO_API_KEY=< YOUR AUTH TOKEN > poetry run python -m py310.example_load_gen
139+ MOMENTO_API_KEY=< YOUR_API_KEY > MOMENTO_ENDPOINT= < YOUR_ENDPOINT > poetry run python -m py310.example_load_gen
139140```
140141
141142You can check out the example code in [ example_load_gen.py] ( py310/example_load_gen.py ) . The configurable
0 commit comments