most-client 1.0.26__tar.gz → 1.0.27__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.26
3
+ Version: 1.0.27
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -1,11 +1,12 @@
1
1
  import io
2
2
  import os
3
3
  import uuid
4
+ from datetime import datetime, timezone
4
5
  from pathlib import Path
5
6
  from typing import Dict, List, Optional, Union
6
7
  import json5
7
8
  import httpx
8
- from adaptix import Retort
9
+ from adaptix import Retort, loader
9
10
  from pydub import AudioSegment
10
11
  from most._constrants import DEFAULT_MAX_RETRIES, DEFAULT_RETRY_DELAY
11
12
  from most.score_calculation import ScoreCalculation
@@ -22,7 +23,11 @@ from most.types import (
22
23
 
23
24
 
24
25
  class MostClient(object):
25
- retort = Retort()
26
+ retort = Retort(recipe=[
27
+ loader(int, lambda x: int(x)),
28
+ loader(float, lambda x: float(x)),
29
+ loader(datetime, lambda x: datetime.fromtimestamp(x).replace(tzinfo=timezone.utc)),
30
+ ],)
26
31
 
27
32
  def __init__(self,
28
33
  client_id=None,
@@ -1,11 +1,12 @@
1
1
  import io
2
2
  import os
3
3
  import uuid
4
+ from datetime import datetime, timezone
4
5
  from pathlib import Path
5
6
  from typing import Dict, List, Optional, Union
6
7
  import httpx
7
8
  import json5
8
- from adaptix import Retort
9
+ from adaptix import Retort, loader
9
10
  from pydub import AudioSegment
10
11
  from most._constrants import DEFAULT_MAX_RETRIES
11
12
  from most.score_calculation import ScoreCalculation
@@ -22,7 +23,11 @@ from most.types import (
22
23
 
23
24
 
24
25
  class AsyncMostClient(object):
25
- retort = Retort()
26
+ retort = Retort(recipe=[
27
+ loader(int, lambda x: int(x)),
28
+ loader(float, lambda x: float(x)),
29
+ loader(datetime, lambda x: datetime.fromtimestamp(x).replace(tzinfo=timezone.utc)),
30
+ ])
26
31
 
27
32
  def __init__(self,
28
33
  client_id=None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.26
3
+ Version: 1.0.27
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -8,7 +8,7 @@ with open('requirements.txt', 'r') as f:
8
8
 
9
9
  setup(
10
10
  name='most-client',
11
- version='1.0.26',
11
+ version='1.0.27',
12
12
  python_requires=f'>=3.6',
13
13
  description='Most AI API for https://the-most.ai',
14
14
  url='https://github.com/the-most-ai/most-client',
File without changes
File without changes
File without changes
File without changes