Skip to content

Commit

Permalink
fixing MVI develop section.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoSQLKnowHow committed Sep 19, 2023
1 parent 36216ff commit 1d5e3ab
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/vector-index/develop/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
sidebar_position: 2
sidebar_label: Develop
sidebar_class_name: "sidebar-item-api-reference"
title: Developing applications with Momento SDKs
description: Learn the core concepts for getting started with the Momento SDKs.
---

import { SdkExampleTabs } from "@site/src/components/SdkExampleTabs";
// This import is necessary even though it looks like it's un-used; The inject-example-code-snippet
// plugin will transform instances of SdkExampleTabs to SdkExampleTabsImpl
import { SdkExampleTabsImpl } from "@site/src/components/SdkExampleTabsImpl";

# Developing applications with Momento SDKs

Welcome! This page provides information about common constructs you will need in order to assemble Momento clients in all of our SDKs. This page covers how to provide your Momento credentials (called api keys), how to configure your client, and some basic information about error handling and production readiness.

![a technical illustration on a white background depicting the intersection of speed, ease of use, and security.](@site/static/img/city.jpg)

## Constructing a Preview Momento Vector Index client

Work in progress.

## Instantiating credential providers using Momento api keys

You need to provide a Momento auth token when instantiating a Momento client. If you don't have one yet, you can get one from the [Momento Web Console](https://console.gomomento.com/). Once you have a token, provide it to Momento SDKs when you create an instance of `CredentialProvider`. There are convenient factory methods provided to construct a `CredentialProvider` object, either from an environment variable or from a String. Below is an example of how to instantiate `CredentialProvider` from an environment variable:

<SdkExampleTabs snippetId={'API_CredentialProviderFromEnvVar'} />

If you're storing your Momento auth token in a secret manager such as [AWS Secret Manager](https://aws.amazon.com/secrets-manager/), [GCP Secret Manager](https://cloud.google.com/secret-manager), or a local config file, you must first retrieve the credentials from there and then instantiate a `CredentialProvider` from a string, like this:

<SdkExampleTabs snippetId={'API_CredentialProviderFromString'} />
10 changes: 10 additions & 0 deletions docs/vector-index/develop/sdks/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"label": "SDKs",
"position": 7,
"collapsible": true,
"collapsed": true,
"link": {
"description": "Momento SDKs, available in all of your favorite programming languages!"
},
"className": "sidebar-item-api-reference"
}
28 changes: 28 additions & 0 deletions docs/vector-index/develop/sdks/python/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 3
title: Momento Python SDK
pagination_prev: null
sidebar_label: Python
description: Information about the Momento Python SDK
---

# Momento Python SDK

![image of a python](@site/static/img/snake.png)

Welcome to the Momento Python SDK documentation!

The Momento Python SDK is available via the pypi package [`momento`](https://pypi.org/project/momento/).

The source code can be found on GitHub: [momentohq/client-sdk-python](https://github.com/momentohq/client-sdk-python).

## Requirements

- [Python 3.7](https://www.python.org/downloads/) or above is required
- A Momento Auth Token is required; you can get one from the [Momento Web Console](https://console.gomomento.com/).

## Resources

- [Python SDK Examples](https://github.com/momentohq/client-sdk-python/blob/main/examples/README.md): working example projects that illustrate how to use the Python SDK
- COMING SOON: Observability: Logging and Client-side Metrics with the Python SDK
- COMING SOON: Taking your code to prod: Configuration and Error handling in the Python SDK

0 comments on commit 1d5e3ab

Please sign in to comment.