most-client 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl
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.
- most/api.py +5 -0
- most/async_api.py +5 -0
- most/types.py +15 -7
- {most_client-1.0.3.dist-info → most_client-1.0.4.dist-info}/METADATA +1 -1
- {most_client-1.0.3.dist-info → most_client-1.0.4.dist-info}/RECORD +8 -8
- {most_client-1.0.3.dist-info → most_client-1.0.4.dist-info}/WHEEL +0 -0
- {most_client-1.0.3.dist-info → most_client-1.0.4.dist-info}/top_level.txt +0 -0
- {most_client-1.0.3.dist-info → most_client-1.0.4.dist-info}/zip-safe +0 -0
most/api.py
CHANGED
@@ -119,6 +119,11 @@ class MostClient(object):
|
|
119
119
|
files={"audio_file": f})
|
120
120
|
return self.retort.load(resp.json(), Audio)
|
121
121
|
|
122
|
+
def upload_audio_url(self, audio_url) -> Audio:
|
123
|
+
resp = self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_url",
|
124
|
+
json={"audio_url": audio_url})
|
125
|
+
return self.retort.load(resp.json(), Audio)
|
126
|
+
|
122
127
|
def list_audios(self,
|
123
128
|
offset: int = 0,
|
124
129
|
limit: int = 10) -> List[Audio]:
|
most/async_api.py
CHANGED
@@ -126,6 +126,11 @@ class AsyncMostClient(object):
|
|
126
126
|
timeout=None)
|
127
127
|
return self.retort.load(resp.json(), Audio)
|
128
128
|
|
129
|
+
async def upload_audio_url(self, audio_url) -> Audio:
|
130
|
+
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_url",
|
131
|
+
json={"audio_url": audio_url})
|
132
|
+
return self.retort.load(resp.json(), Audio)
|
133
|
+
|
129
134
|
async def list_audios(self,
|
130
135
|
offset: int = 0,
|
131
136
|
limit: int = 10) -> List[Audio]:
|
most/types.py
CHANGED
@@ -1,45 +1,53 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
|
+
from dataclasses_json import dataclass_json, DataClassJsonMixin
|
2
3
|
from typing import Optional, List, Literal
|
3
4
|
|
4
5
|
|
6
|
+
@dataclass_json
|
5
7
|
@dataclass
|
6
|
-
class Audio:
|
8
|
+
class Audio(DataClassJsonMixin):
|
7
9
|
id: str
|
8
10
|
url: str
|
9
11
|
|
10
12
|
|
13
|
+
@dataclass_json
|
11
14
|
@dataclass
|
12
|
-
class SubcolumnResult:
|
15
|
+
class SubcolumnResult(DataClassJsonMixin):
|
13
16
|
name: str
|
14
17
|
score: Optional[int]
|
15
18
|
description: str
|
16
19
|
|
17
20
|
|
21
|
+
@dataclass_json
|
18
22
|
@dataclass
|
19
|
-
class ColumnResult:
|
23
|
+
class ColumnResult(DataClassJsonMixin):
|
20
24
|
name: str
|
21
25
|
subcolumns: List[SubcolumnResult]
|
22
26
|
|
23
27
|
|
28
|
+
@dataclass_json
|
24
29
|
@dataclass
|
25
|
-
class Result:
|
30
|
+
class Result(DataClassJsonMixin):
|
26
31
|
id: str
|
27
32
|
text: Optional[str]
|
28
33
|
url: Optional[str]
|
29
34
|
results: Optional[List[ColumnResult]]
|
30
35
|
|
31
36
|
|
37
|
+
@dataclass_json
|
32
38
|
@dataclass
|
33
|
-
class Column:
|
39
|
+
class Column(DataClassJsonMixin):
|
34
40
|
name: str
|
35
41
|
subcolumns: List[str]
|
36
42
|
|
37
43
|
|
44
|
+
@dataclass_json
|
38
45
|
@dataclass
|
39
|
-
class Script:
|
46
|
+
class Script(DataClassJsonMixin):
|
40
47
|
columns: List[Column]
|
41
48
|
|
42
49
|
|
50
|
+
@dataclass_json
|
43
51
|
@dataclass
|
44
|
-
class JobStatus:
|
52
|
+
class JobStatus(DataClassJsonMixin):
|
45
53
|
status: Literal["not_found", "pending", "completed", "error"]
|
@@ -1,13 +1,13 @@
|
|
1
1
|
most/__init__.py,sha256=62uFFeM_1VVR83K3bTYWK3PEoqnmFCy9aWYerQ6U4Ds,67
|
2
|
-
most/api.py,sha256=
|
3
|
-
most/async_api.py,sha256=
|
4
|
-
most/types.py,sha256=
|
2
|
+
most/api.py,sha256=8lhnJU89qMiCjYgc5Gv4Z2i782ltBA7oTtnR57WyjK8,7285
|
3
|
+
most/async_api.py,sha256=tHo-vVa3a1LVCZ7c-Zwp5fmMx88AoZ3c-84VpLtlNFc,7946
|
4
|
+
most/types.py,sha256=phMLar9VTZIVeHLBLHYsEBiTvz8af-GHHF1GLctGytE,969
|
5
5
|
most/__pycache__/__init__.cpython-310.pyc,sha256=5RlgyJsgWSNkWEufVPFWDKxat0cEMCdwD8QFz5FvIj8,193
|
6
6
|
most/__pycache__/api.cpython-310.pyc,sha256=vAmUcfJHdL-59JuzcMpDfQedBaTk62nomDuzTt-thx0,5894
|
7
7
|
most/__pycache__/async_api.cpython-310.pyc,sha256=ng8wYkVziihVAMlv1ugFQQf-qFqP0NgAIfqKqE-K4k8,6615
|
8
8
|
most/__pycache__/types.cpython-310.pyc,sha256=OE7jIlp_0lo6XAwsnVnbsYsjjppGzTUcVo5ve6uHnQg,1492
|
9
|
-
most_client-1.0.
|
10
|
-
most_client-1.0.
|
11
|
-
most_client-1.0.
|
12
|
-
most_client-1.0.
|
13
|
-
most_client-1.0.
|
9
|
+
most_client-1.0.4.dist-info/METADATA,sha256=eijnCdZFCVPNdMYgEZirZYedoNzPRJiku6Hcf8_Gvjo,864
|
10
|
+
most_client-1.0.4.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
11
|
+
most_client-1.0.4.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
12
|
+
most_client-1.0.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
13
|
+
most_client-1.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|