Add TypeScript examples for Documentation & Quickstart (#376)

* Add TS examples for Documentation/Concepts

* Minor FAQ improvements: spelling & formatting (#318)

* Minor spelling and formatting improvements in FAQ

* Add unused RAM is wasted RAM quote, improve memory text

* Add TypeScript version of Quickstart (#378)

* Minor FAQ improvements: spelling & formatting (#318)

* Minor spelling and formatting improvements in FAQ

* Add unused RAM is wasted RAM quote, improve memory text

* Add TS version of quickstart

---------

Co-authored-by: Tim Visée <tim@visee.me>

* Add TS examples to Documentation / Guides

* Fix terminology

* Add TS examples to Documentation / Cloud

* Add TS version of bulk upload tutorial

* Format tutorials with black

* Move author data to [params.author] (#385)

* Add TS examples for Documentation/Concepts

* Add TypeScript version of Quickstart (#378)

* Minor FAQ improvements: spelling & formatting (#318)

* Minor spelling and formatting improvements in FAQ

* Add unused RAM is wasted RAM quote, improve memory text

* Add TS version of quickstart

---------

Co-authored-by: Tim Visée <tim@visee.me>

* Add TS examples to Documentation / Guides

* Fix terminology

* Add TS examples to Documentation / Cloud

* Add TS version of bulk upload tutorial

* Format tutorials with black

---------

Co-authored-by: Tim Visée <tim@visee.me>
This commit is contained in:
Kacper Łukawski
2023-10-31 11:45:05 +01:00
committed by GitHub
co-authored by Tim Visée
parent c79061a2ef
commit a389d78bd2
24 changed files with 2225 additions and 425 deletions
@@ -18,23 +18,31 @@ However, we recommend rotating the keys from time to time. To create additional
> **Note:** You can create a key that provides access to multiple clusters. Simply check off which cluster in the dropdown
4. Click **OK** and retrieve your API key.
## Authenticate via Python client
## Authenticate via SDK
Now that you have created your first cluster and key, you might want to access Qdrant Cloud from within your application.
Our official Qdrant clients for Python, Go, and Rust all support the API key parameter.
```python
from qdrant_client import QdrantClient
qdrant_client = QdrantClient(
"xyz-example.eu-central.aws.cloud.qdrant.io",
prefer_grpc=True,
api_key="<<-provide-your-own-key->>",
)
```
Our official Qdrant clients for Python, TypeScript, Go, and Rust all support the API key parameter.
```bash
curl \
-X GET https://xyz-example.eu-central.aws.cloud.qdrant.io:6333 \
--header 'api-key: <provide-your-own-key>'
```
```python
from qdrant_client import QdrantClient
qdrant_client = QdrantClient(
"xyz-example.eu-central.aws.cloud.qdrant.io",
api_key="<paste-your-api-key-here>",
)
```
```typescript
import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({
host: "xyz-example.eu-central.aws.cloud.qdrant.io",
apiKey: "<paste-your-api-key-here>",
});
```
@@ -36,17 +36,25 @@ Open Terminal and run the request. You should get a response that looks like thi
```
> **Note:** The API key needs to be present in the request header every time you make a request via Rest or gRPC interface.
## Step 3: Authenticate via Python client
## Step 3: Authenticate via SDK
Now that you have created your first cluster and key, you might want to access Qdrant Cloud from within your application.
Our official Qdrant clients for Python, Go, and Rust all support the API key parameter.
Our official Qdrant clients for Python, TypeScript, Go, and Rust all support the API key parameter.
```python
from qdrant_client import QdrantClient
qdrant_client = QdrantClient(
"xyz-example.eu-central.aws.cloud.qdrant.io",
prefer_grpc=True,
"xyz-example.eu-central.aws.cloud.qdrant.io",
api_key="<paste-your-api-key-here>",
)
```
```typescript
import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({
host: "xyz-example.eu-central.aws.cloud.qdrant.io",
apiKey: "<paste-your-api-key-here>",
});
```