Skip to content

Commit a5cbffe

Browse files
committed
improve lib readmes
1 parent 0580833 commit a5cbffe

File tree

2 files changed

+10
-77
lines changed

2 files changed

+10
-77
lines changed

scripts/python_README.md

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
from dataclasses import field
2-
31
# Vectorize Client
4-
Python Api Client for Vectorize
5-
For more information, please visit [https://vectorize.io](https://vectorize.io)
6-
7-
## Requirements.
2+
Python Api Client for [Vectorize](https://vectorize.io).
3+
For the full documentation, please visit [docs.vectorize.io](https://docs.vectorize.io/api/api-getting-started).
84

9-
Python 3.8+
105

11-
## Installation & Usage
6+
## Installation
127
```sh
138
pip install vectorize-client
149
```
@@ -20,8 +15,7 @@ import vectorize_client
2015

2116
## Getting Started
2217

23-
Please follow the [installation procedure](#installation--usage) and then run the following:
24-
18+
List all your pipelines:
2519
```python
2620
import vectorize_client as v
2721

@@ -34,62 +28,5 @@ with v.ApiClient(v.Configuration(access_token=TOKEN)) as api:
3428
print("Found" + str(len(response.data)) + " pipelines")
3529
```
3630

37-
## Documentation for API Endpoints
38-
39-
All URIs are relative to *https://api.vectorize.io/v1*
40-
41-
See the full [reference](https://vectorize.readme.io/reference) for more information.
42-
43-
## Usage
44-
45-
First, export your token and org id as environment variables:
46-
47-
```sh
48-
export VECTORIZE_TOKEN=<your-token>
49-
export VECTORIZE_ORG=<your-org-id>
50-
```
51-
Then, initialize the client with your token and org id:
52-
53-
```python
54-
import os
55-
TOKEN = os.environ['VECTORIZE_TOKEN']
56-
ORG = os.environ['VECTORIZE_ORG']
57-
```
58-
59-
### Extraction
60-
61-
Set the file you want to extract data from:
62-
63-
```sh
64-
export FILE=<path-to-file>
65-
```
66-
67-
Then, run the following code:
68-
```python
69-
import os
70-
import vectorize_client as v
71-
import time, logging
72-
73-
TOKEN = os.environ['VECTORIZE_TOKEN']
74-
ORG = os.environ['VECTORIZE_ORG']
75-
FILE = os.environ['FILE']
76-
77-
with v.ApiClient(v.Configuration(access_token=TOKEN)) as api:
78-
with open(FILE, 'rb') as file:
79-
data = file.read()
80-
extraction_id = v.ExtractionApi(api).start_extraction(ORG, data).extraction_id
81-
print(f"Extraction started with id {extraction_id}")
82-
while True:
83-
extraction = v.ExtractionApi(api).get_extraction_result(ORG, extraction_id)
84-
if extraction.ready:
85-
extracted_data = extraction.data
86-
if extracted_data.success:
87-
print(extracted_data)
88-
break
89-
else:
90-
raise Exception(extracted_data.error)
91-
print("Waiting for extraction to complete...")
92-
time.sleep(1)
93-
```
94-
31+
Visit [docs.vectorize.io](https://docs.vectorize.io/api/api-getting-started) to learn more about the API.
9532

scripts/ts_README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Vectorize Client
2-
Typescript Api Client for Vectorize
3-
For more information, please visit [https://vectorize.io](https://vectorize.io)
2+
Node Api Client for [Vectorize](https://vectorize.io).
3+
For the full documentation, please visit [docs.vectorize.io](https://docs.vectorize.io/api/api-getting-started).
44

5-
## Installation & Usage
5+
## Installation
66
```sh
77
npm install @vectorize-io/vectorize-client
88
```
99

1010
## Getting Started
1111

12-
Please follow the [installation procedure](#installation--usage) and then run the following:
12+
List all your pipelines:
1313

1414
```typescript
1515

@@ -23,8 +23,4 @@ const pipelines = connectorsApi.getPipelines({
2323
console.log(pipelines)
2424
```
2525

26-
## Documentation for API Endpoints
27-
28-
All URIs are relative to *https://api.vectorize.io/v1*
29-
30-
See the full [reference](https://vectorize.readme.io/reference) for more information.
26+
Visit [docs.vectorize.io](https://docs.vectorize.io/api/api-getting-started) to learn more about the API.

0 commit comments

Comments
 (0)