most-client 1.0.6__py3-none-any.whl → 1.0.7__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 +4 -1
- most/async_api.py +4 -4
- {most_client-1.0.6.dist-info → most_client-1.0.7.dist-info}/METADATA +1 -1
- {most_client-1.0.6.dist-info → most_client-1.0.7.dist-info}/RECORD +7 -7
- {most_client-1.0.6.dist-info → most_client-1.0.7.dist-info}/WHEEL +0 -0
- {most_client-1.0.6.dist-info → most_client-1.0.7.dist-info}/top_level.txt +0 -0
- {most_client-1.0.6.dist-info → most_client-1.0.7.dist-info}/zip-safe +0 -0
most/api.py
CHANGED
@@ -72,7 +72,8 @@ class MostClient(object):
|
|
72
72
|
def refresh_access_token(self):
|
73
73
|
resp = self.session.post("https://api.the-most.ai/api/external/access_token",
|
74
74
|
json={"client_id": self.client_id,
|
75
|
-
"client_secret": self.client_secret}
|
75
|
+
"client_secret": self.client_secret},
|
76
|
+
timeout=None)
|
76
77
|
access_token = resp.json()
|
77
78
|
self.access_token = access_token
|
78
79
|
|
@@ -83,6 +84,7 @@ class MostClient(object):
|
|
83
84
|
headers.update({"Authorization": "Bearer %s" % self.access_token})
|
84
85
|
resp = self.session.get(url,
|
85
86
|
headers=headers,
|
87
|
+
timeout=None,
|
86
88
|
**kwargs)
|
87
89
|
if resp.status_code == 401:
|
88
90
|
self.refresh_access_token()
|
@@ -105,6 +107,7 @@ class MostClient(object):
|
|
105
107
|
data=data,
|
106
108
|
json=json,
|
107
109
|
headers=headers,
|
110
|
+
timeout=None,
|
108
111
|
**kwargs)
|
109
112
|
if resp.status_code == 401:
|
110
113
|
self.refresh_access_token()
|
most/async_api.py
CHANGED
@@ -89,6 +89,7 @@ class AsyncMostClient(object):
|
|
89
89
|
headers.update({"Authorization": "Bearer %s" % self.access_token})
|
90
90
|
resp = await self.session.get(url,
|
91
91
|
headers=headers,
|
92
|
+
timeout=None,
|
92
93
|
**kwargs)
|
93
94
|
if resp.status_code == 401:
|
94
95
|
await self.refresh_access_token()
|
@@ -112,6 +113,7 @@ class AsyncMostClient(object):
|
|
112
113
|
data=data,
|
113
114
|
json=json,
|
114
115
|
headers=headers,
|
116
|
+
timeout=None,
|
115
117
|
**kwargs)
|
116
118
|
if resp.status_code == 401:
|
117
119
|
await self.refresh_access_token()
|
@@ -128,8 +130,7 @@ class AsyncMostClient(object):
|
|
128
130
|
async def upload_audio(self, audio_path) -> Audio:
|
129
131
|
with open(audio_path, mode='rb') as f:
|
130
132
|
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload",
|
131
|
-
files={"audio_file": f}
|
132
|
-
timeout=None)
|
133
|
+
files={"audio_file": f})
|
133
134
|
return self.retort.load(resp.json(), Audio)
|
134
135
|
|
135
136
|
async def upload_audio_url(self, audio_url) -> Audio:
|
@@ -158,8 +159,7 @@ class AsyncMostClient(object):
|
|
158
159
|
async def apply(self, audio_id) -> Result:
|
159
160
|
if self.model_id is None:
|
160
161
|
raise RuntimeError("Please choose a model to apply. [try list_models()]")
|
161
|
-
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/audio/{audio_id}/model/{self.model_id}/apply"
|
162
|
-
timeout=None)
|
162
|
+
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/audio/{audio_id}/model/{self.model_id}/apply")
|
163
163
|
return self.retort.load(resp.json(), Result)
|
164
164
|
|
165
165
|
async def apply_later(self, audio_id):
|
@@ -1,13 +1,13 @@
|
|
1
1
|
most/__init__.py,sha256=62uFFeM_1VVR83K3bTYWK3PEoqnmFCy9aWYerQ6U4Ds,67
|
2
|
-
most/api.py,sha256
|
3
|
-
most/async_api.py,sha256=
|
2
|
+
most/api.py,sha256=-vs2oUAxS4D7r6pT3gLDLCFKGFq8KYMHK8J4OZiT_lo,7781
|
3
|
+
most/async_api.py,sha256=8ygKjUzBXNyO3EX4WiPwVCMlfwhPJLIcCtlR6DaYABk,8347
|
4
4
|
most/types.py,sha256=xtKsXbO40AgLIgTf-YndJnT2yfTlCl-p-j3M1CMBB8k,1377
|
5
5
|
most/__pycache__/__init__.cpython-310.pyc,sha256=uRCbA8tXEFLxmAlpQAF8Vdh8AZbpR52RSrGOfKRxpAQ,229
|
6
6
|
most/__pycache__/api.cpython-310.pyc,sha256=YuMpKt9DwpvUgXH2qPKMVbJxwgkTLrp9wso73MA3jkM,6582
|
7
7
|
most/__pycache__/async_api.cpython-310.pyc,sha256=d4RQJ-yhe9rbMjjU_7IyeK0lRB7WalIdXpXRxz-Db4A,7328
|
8
8
|
most/__pycache__/types.cpython-310.pyc,sha256=B3tij9LD4YJAXWiC3VHtnkVzpw5QRirrHpDMD-vekII,1861
|
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.7.dist-info/METADATA,sha256=998XxFnZjTTpsyjTvJiQ9mwwkWCLDjf8V9o6N_yOJXQ,864
|
10
|
+
most_client-1.0.7.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
11
|
+
most_client-1.0.7.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
12
|
+
most_client-1.0.7.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
13
|
+
most_client-1.0.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|