Skip to content

Conversation

@anitarua
Copy link
Contributor

@anitarua anitarua commented Jan 6, 2026

Work towards https://github.com/momentohq/dev-eco-issue-tracker/issues/1276

  1. updates github actions workflows to use env vars V1_API_KEY, MOMENTO_API_KEY, and MOMENTO_ENDPOINT
  2. removes usage of TEST_API_KEY
  3. updates examples readme for new env vars
  4. updates non-auth client examples to default to using from_environment_variables_v2()
  5. existing tests now use V1_API_KEY
  6. new minimal test suites exercising v2 api key use MOMENTO_API_KEY and MOMENTO_ENDPOINT

@anitarua anitarua marked this pull request as ready for review January 6, 2026 17:00
@anitarua anitarua requested a review from nand4011 January 6, 2026 17:01
def example_API_CredentialProviderFromEnvVar():
CredentialProvider.from_environment_variable("MOMENTO_API_KEY")
CredentialProvider.from_environment_variable("V1_API_KEY")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better to fix in the dev docs parsing logic, but I'm pretty sure the two blank lines between the code and #end example end up included in the code snippet in docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a ticket to make updates to the dev docs site for api keys v2, will make a note about this there

_logger.info("hello")
with TopicClient(TopicConfigurations.Default.v1(), _AUTH_PROVIDER) as client:
with TopicClient(
TopicConfigurations.Default.v1().with_client_timeout(timedelta(seconds=10)), _AUTH_PROVIDER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to override the client timeout, I think we should add a Laptop TopicConfiguration so we don't need to clutter the examples. That can be a follow up thing though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a ticket here: #515

@anitarua anitarua merged commit 2c8738f into main Jan 7, 2026
11 checks passed
@anitarua anitarua deleted the update-tests-examples branch January 7, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants