sentor-ml 1.0.2__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/PKG-INFO +4 -16
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/README.md +3 -15
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor/client.py +4 -4
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/PKG-INFO +4 -16
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/setup.py +1 -1
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/tests/test_client.py +1 -1
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor/__init__.py +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor/exceptions.py +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/SOURCES.txt +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/dependency_links.txt +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/entry_points.txt +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/requires.txt +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/sentor_ml.egg-info/top_level.txt +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/setup.cfg +0 -0
- {sentor_ml-1.0.2 → sentor_ml-1.2.0}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sentor-ml
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A Python SDK for interacting with the Sentor ML API for sentiment analysis
|
|
5
5
|
Home-page: https://github.com/NIKX-Tech/sentor-ml-python-sdk
|
|
6
6
|
Author: NIKX Technologies
|
|
@@ -47,21 +47,9 @@ A Python SDK for interacting with the Sentor ML API for sentiment analysis. This
|
|
|
47
47
|
pip install sentor-ml
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
## Get API key
|
|
51
|
-
|
|
52
|
-
### Try with guest API key
|
|
53
|
-
Get a guest API key to try the API.
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
curl -X 'POST' \
|
|
57
|
-
'https://ml.sentor.app/api/auth/guest-access' \
|
|
58
|
-
-H 'accept: application/json' \
|
|
59
|
-
-d ''
|
|
60
|
-
```
|
|
61
|
-
|
|
62
50
|
### Work like a PRO
|
|
63
51
|
|
|
64
|
-
1. Go to [Sentor ML API](https://
|
|
52
|
+
1. Go to [Sentor ML API](https://sentor.app/api)
|
|
65
53
|
2. Subscribe to the Starter plan
|
|
66
54
|
3. Get your API key
|
|
67
55
|
|
|
@@ -209,8 +197,8 @@ print(result)
|
|
|
209
197
|
|
|
210
198
|
## API Reference
|
|
211
199
|
|
|
212
|
-
Please refer to the [Sentor ML API Documentation](https://
|
|
213
|
-
You can also try the API in the [Sentor ML API Swagger Playground](https://
|
|
200
|
+
Please refer to the [Sentor ML API Documentation](https://sentor.app/docs) for more details.
|
|
201
|
+
You can also try the API in the [Sentor ML API Swagger Playground](https://sentor.app/docs).
|
|
214
202
|
|
|
215
203
|
## Contributing
|
|
216
204
|
|
|
@@ -17,21 +17,9 @@ A Python SDK for interacting with the Sentor ML API for sentiment analysis. This
|
|
|
17
17
|
pip install sentor-ml
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
## Get API key
|
|
21
|
-
|
|
22
|
-
### Try with guest API key
|
|
23
|
-
Get a guest API key to try the API.
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
curl -X 'POST' \
|
|
27
|
-
'https://ml.sentor.app/api/auth/guest-access' \
|
|
28
|
-
-H 'accept: application/json' \
|
|
29
|
-
-d ''
|
|
30
|
-
```
|
|
31
|
-
|
|
32
20
|
### Work like a PRO
|
|
33
21
|
|
|
34
|
-
1. Go to [Sentor ML API](https://
|
|
22
|
+
1. Go to [Sentor ML API](https://sentor.app/api)
|
|
35
23
|
2. Subscribe to the Starter plan
|
|
36
24
|
3. Get your API key
|
|
37
25
|
|
|
@@ -179,8 +167,8 @@ print(result)
|
|
|
179
167
|
|
|
180
168
|
## API Reference
|
|
181
169
|
|
|
182
|
-
Please refer to the [Sentor ML API Documentation](https://
|
|
183
|
-
You can also try the API in the [Sentor ML API Swagger Playground](https://
|
|
170
|
+
Please refer to the [Sentor ML API Documentation](https://sentor.app/docs) for more details.
|
|
171
|
+
You can also try the API in the [Sentor ML API Swagger Playground](https://sentor.app/docs).
|
|
184
172
|
|
|
185
173
|
## Contributing
|
|
186
174
|
|
|
@@ -17,7 +17,7 @@ class SentorClient:
|
|
|
17
17
|
def __init__(
|
|
18
18
|
self,
|
|
19
19
|
api_key: str,
|
|
20
|
-
base_url: str = "https://
|
|
20
|
+
base_url: str = "https://sentor.app/api",
|
|
21
21
|
timeout: int = 30,
|
|
22
22
|
):
|
|
23
23
|
"""
|
|
@@ -49,13 +49,13 @@ class SentorClient:
|
|
|
49
49
|
if not documents:
|
|
50
50
|
raise ValueError("Input is required")
|
|
51
51
|
|
|
52
|
-
url = f"{self.base_url}/
|
|
52
|
+
url = f"{self.base_url}/predicts"
|
|
53
53
|
payload = {"docs": documents}
|
|
54
54
|
response = requests.post(
|
|
55
55
|
url, json=payload, headers=self.headers, timeout=self.timeout
|
|
56
56
|
)
|
|
57
57
|
|
|
58
|
-
if response.status_code == 200:
|
|
58
|
+
if response.status_code == 200 or response.status_code == 201:
|
|
59
59
|
return response.json()
|
|
60
60
|
elif response.status_code == 429:
|
|
61
61
|
raise RateLimitError(response.json())
|
|
@@ -73,7 +73,7 @@ class SentorClient:
|
|
|
73
73
|
Raises:
|
|
74
74
|
SentorAPIError: If health check fails
|
|
75
75
|
"""
|
|
76
|
-
url = f"{self.base_url}/health"
|
|
76
|
+
url = f"{self.base_url}/predicts/health"
|
|
77
77
|
response = requests.get(
|
|
78
78
|
url,
|
|
79
79
|
headers=self.headers,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sentor-ml
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A Python SDK for interacting with the Sentor ML API for sentiment analysis
|
|
5
5
|
Home-page: https://github.com/NIKX-Tech/sentor-ml-python-sdk
|
|
6
6
|
Author: NIKX Technologies
|
|
@@ -47,21 +47,9 @@ A Python SDK for interacting with the Sentor ML API for sentiment analysis. This
|
|
|
47
47
|
pip install sentor-ml
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
## Get API key
|
|
51
|
-
|
|
52
|
-
### Try with guest API key
|
|
53
|
-
Get a guest API key to try the API.
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
curl -X 'POST' \
|
|
57
|
-
'https://ml.sentor.app/api/auth/guest-access' \
|
|
58
|
-
-H 'accept: application/json' \
|
|
59
|
-
-d ''
|
|
60
|
-
```
|
|
61
|
-
|
|
62
50
|
### Work like a PRO
|
|
63
51
|
|
|
64
|
-
1. Go to [Sentor ML API](https://
|
|
52
|
+
1. Go to [Sentor ML API](https://sentor.app/api)
|
|
65
53
|
2. Subscribe to the Starter plan
|
|
66
54
|
3. Get your API key
|
|
67
55
|
|
|
@@ -209,8 +197,8 @@ print(result)
|
|
|
209
197
|
|
|
210
198
|
## API Reference
|
|
211
199
|
|
|
212
|
-
Please refer to the [Sentor ML API Documentation](https://
|
|
213
|
-
You can also try the API in the [Sentor ML API Swagger Playground](https://
|
|
200
|
+
Please refer to the [Sentor ML API Documentation](https://sentor.app/docs) for more details.
|
|
201
|
+
You can also try the API in the [Sentor ML API Swagger Playground](https://sentor.app/docs).
|
|
214
202
|
|
|
215
203
|
## Contributing
|
|
216
204
|
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="sentor-ml",
|
|
8
|
-
version="1.0
|
|
8
|
+
version="1.2.0",
|
|
9
9
|
author="NIKX Technologies",
|
|
10
10
|
author_email="sentor@nikx.one",
|
|
11
11
|
description="A Python SDK for interacting with the Sentor ML API for sentiment analysis",
|
|
@@ -20,7 +20,7 @@ def test_client_initialization():
|
|
|
20
20
|
client = SentorClient(api_key="test-key")
|
|
21
21
|
assert isinstance(client, SentorClient)
|
|
22
22
|
assert client.api_key == "test-key"
|
|
23
|
-
assert client.base_url == "https://
|
|
23
|
+
assert client.base_url == "https://sentor.app/api"
|
|
24
24
|
assert client.timeout == 30
|
|
25
25
|
|
|
26
26
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|