From 1d5e3aba3366cf1dbc9bf9ab78278cd45a6d17f4 Mon Sep 17 00:00:00 2001 From: Kirk Kirkconnell Date: Tue, 19 Sep 2023 15:27:58 -0700 Subject: [PATCH] fixing MVI develop section. --- docs/vector-index/develop/index.md | 32 +++++++++++++++++++ .../vector-index/develop/sdks/_category_.json | 10 ++++++ .../vector-index/develop/sdks/python/index.md | 28 ++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 docs/vector-index/develop/index.md create mode 100644 docs/vector-index/develop/sdks/_category_.json create mode 100644 docs/vector-index/develop/sdks/python/index.md diff --git a/docs/vector-index/develop/index.md b/docs/vector-index/develop/index.md new file mode 100644 index 000000000..8e65aa82a --- /dev/null +++ b/docs/vector-index/develop/index.md @@ -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: + + + +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: + + diff --git a/docs/vector-index/develop/sdks/_category_.json b/docs/vector-index/develop/sdks/_category_.json new file mode 100644 index 000000000..2e877b082 --- /dev/null +++ b/docs/vector-index/develop/sdks/_category_.json @@ -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" +} diff --git a/docs/vector-index/develop/sdks/python/index.md b/docs/vector-index/develop/sdks/python/index.md new file mode 100644 index 000000000..809610231 --- /dev/null +++ b/docs/vector-index/develop/sdks/python/index.md @@ -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