New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@upstash/sdk

Package Overview
Dependencies
Maintainers
6
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/sdk

An umbrella SDK for all other Upstash SDKs

latest
Source
npmnpm
Version
0.0.30-alpha
Version published
Maintainers
6
Created
Source

Upstash SDK Node.js Client · license Tests npm (scoped) npm bundle size npm weekly download

@upstash/sdk is an umbrella HTTP/REST based client for Typescript, built on top of other Upstash products and SDKs.

Quick Start

Install

Node.js

npm install @upstash/sdk

Basic Usage:

const client = new Upstash({
  email: "your-upstash-email@gmail.com",
  token: "developer-token",
});

//OR

//If you have your env keys already in your .env file, you don't have to pass them explicitly
const client = new Upstash();

//VECTOR SDK
const createRes = await client.createVectorIndex({
  name: "uptash-rocks",
  region: "eu-west-1",
  dimension_count: 2,
  similarity_function: "COSINE",
  type: "fixed",
});

const index = await client.newVectorClient(createRes.id);
await index.info();

const indexes = await client.listVectorIndexes();

await client.deleteVectorIndex(createRes.id);

//REDIS SDK
const createRes = await client.createRedisDatabase({
  name: "uptash-rocks",
  region: "eu-central-1",
  tls: true,
});

const redis = await client.newRedisClient(createRes.database_name);
await redis.incr("hut-two-three-four");

const dbs = await client.listRedisDatabases();

await client.deleteRedisDatabase(createRes.database_name);

//QSTASH SDK
const { client, receiver } = await client.newQStashClient();
await qstashClient.publishJSON();
await qstashReceiver.verify();

Troubleshooting

We have a Discord for common problems. If you can't find a solution, please open an issue.

Docs

See the documentation for details.

Contributing

Install Bun

Running tests

bun run test

Building

bun run build

Keywords

vector

FAQs

Package last updated on 06 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts