mycelium-ai 0.5.0__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.
- mycelium/__init__.py +0 -0
- mycelium/api/__init__.py +0 -0
- mycelium/api/app.py +1147 -0
- mycelium/api/client_app.py +170 -0
- mycelium/api/generated_sources/__init__.py +0 -0
- mycelium/api/generated_sources/server_schemas/__init__.py +97 -0
- mycelium/api/generated_sources/server_schemas/api/__init__.py +5 -0
- mycelium/api/generated_sources/server_schemas/api/default_api.py +2473 -0
- mycelium/api/generated_sources/server_schemas/api_client.py +766 -0
- mycelium/api/generated_sources/server_schemas/api_response.py +25 -0
- mycelium/api/generated_sources/server_schemas/configuration.py +434 -0
- mycelium/api/generated_sources/server_schemas/exceptions.py +166 -0
- mycelium/api/generated_sources/server_schemas/models/__init__.py +41 -0
- mycelium/api/generated_sources/server_schemas/models/api_section.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/chroma_section.py +69 -0
- mycelium/api/generated_sources/server_schemas/models/clap_section.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/compute_on_server200_response.py +79 -0
- mycelium/api/generated_sources/server_schemas/models/compute_on_server_request.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/compute_text_search_request.py +69 -0
- mycelium/api/generated_sources/server_schemas/models/config_request.py +81 -0
- mycelium/api/generated_sources/server_schemas/models/config_response.py +107 -0
- mycelium/api/generated_sources/server_schemas/models/create_playlist_request.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/get_similar_by_track200_response.py +143 -0
- mycelium/api/generated_sources/server_schemas/models/library_stats_response.py +77 -0
- mycelium/api/generated_sources/server_schemas/models/logging_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/media_server_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/playlist_response.py +73 -0
- mycelium/api/generated_sources/server_schemas/models/plex_section.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/processing_response.py +90 -0
- mycelium/api/generated_sources/server_schemas/models/save_config_response.py +73 -0
- mycelium/api/generated_sources/server_schemas/models/scan_library_response.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/search_result_response.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/server_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/stop_processing_response.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/task_status_response.py +87 -0
- mycelium/api/generated_sources/server_schemas/models/track_database_stats.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/track_response.py +77 -0
- mycelium/api/generated_sources/server_schemas/models/tracks_list_response.py +81 -0
- mycelium/api/generated_sources/server_schemas/rest.py +329 -0
- mycelium/api/generated_sources/server_schemas/test/__init__.py +0 -0
- mycelium/api/generated_sources/server_schemas/test/test_api_section.py +57 -0
- mycelium/api/generated_sources/server_schemas/test/test_chroma_section.py +55 -0
- mycelium/api/generated_sources/server_schemas/test/test_clap_section.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_on_server200_response.py +52 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_on_server_request.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_text_search_request.py +54 -0
- mycelium/api/generated_sources/server_schemas/test/test_config_request.py +66 -0
- mycelium/api/generated_sources/server_schemas/test/test_config_response.py +97 -0
- mycelium/api/generated_sources/server_schemas/test/test_create_playlist_request.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_default_api.py +150 -0
- mycelium/api/generated_sources/server_schemas/test/test_get_similar_by_track200_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_library_stats_response.py +63 -0
- mycelium/api/generated_sources/server_schemas/test/test_logging_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_media_server_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_playlist_response.py +58 -0
- mycelium/api/generated_sources/server_schemas/test/test_plex_section.py +56 -0
- mycelium/api/generated_sources/server_schemas/test/test_processing_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_save_config_response.py +58 -0
- mycelium/api/generated_sources/server_schemas/test/test_scan_library_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_search_result_response.py +69 -0
- mycelium/api/generated_sources/server_schemas/test/test_server_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_stop_processing_response.py +55 -0
- mycelium/api/generated_sources/server_schemas/test/test_task_status_response.py +71 -0
- mycelium/api/generated_sources/server_schemas/test/test_track_database_stats.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_track_response.py +63 -0
- mycelium/api/generated_sources/server_schemas/test/test_tracks_list_response.py +75 -0
- mycelium/api/generated_sources/worker_schemas/__init__.py +61 -0
- mycelium/api/generated_sources/worker_schemas/api/__init__.py +5 -0
- mycelium/api/generated_sources/worker_schemas/api/default_api.py +318 -0
- mycelium/api/generated_sources/worker_schemas/api_client.py +766 -0
- mycelium/api/generated_sources/worker_schemas/api_response.py +25 -0
- mycelium/api/generated_sources/worker_schemas/configuration.py +434 -0
- mycelium/api/generated_sources/worker_schemas/exceptions.py +166 -0
- mycelium/api/generated_sources/worker_schemas/models/__init__.py +23 -0
- mycelium/api/generated_sources/worker_schemas/models/save_config_response.py +73 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_clap_section.py +75 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_client_api_section.py +69 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_client_section.py +79 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_config_request.py +73 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_config_response.py +89 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_logging_section.py +67 -0
- mycelium/api/generated_sources/worker_schemas/rest.py +329 -0
- mycelium/api/generated_sources/worker_schemas/test/__init__.py +0 -0
- mycelium/api/generated_sources/worker_schemas/test/test_default_api.py +45 -0
- mycelium/api/generated_sources/worker_schemas/test/test_save_config_response.py +58 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_clap_section.py +60 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_client_api_section.py +55 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_client_section.py +65 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_config_request.py +59 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_config_response.py +89 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_logging_section.py +53 -0
- mycelium/api/worker_models.py +99 -0
- mycelium/application/__init__.py +11 -0
- mycelium/application/job_queue.py +323 -0
- mycelium/application/library_management_use_cases.py +292 -0
- mycelium/application/search_use_cases.py +96 -0
- mycelium/application/services.py +340 -0
- mycelium/client.py +554 -0
- mycelium/client_config.py +251 -0
- mycelium/client_frontend_dist/404.html +1 -0
- mycelium/client_frontend_dist/_next/static/a4iyRdfsvkjdyMAK9cE9Y/_buildManifest.js +1 -0
- mycelium/client_frontend_dist/_next/static/a4iyRdfsvkjdyMAK9cE9Y/_ssgManifest.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/964-830f77d7ce1c2463.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/_not-found/page-d25eede5a9099bd3.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/layout-9b3d32f96dfe13b6.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/page-cc6bad295789134e.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/framework-7c95b8e5103c9e90.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/main-6b37be50736577a2.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/main-app-4153d115599d3126.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/pages/_app-0a0020ddd67f79cf.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/pages/_error-03529f2c21436739.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/webpack-c81e624915b2ea70.js +1 -0
- mycelium/client_frontend_dist/_next/static/css/1eb7f0e2c78e0734.css +1 -0
- mycelium/client_frontend_dist/favicon.ico +0 -0
- mycelium/client_frontend_dist/file.svg +1 -0
- mycelium/client_frontend_dist/globe.svg +1 -0
- mycelium/client_frontend_dist/index.html +1 -0
- mycelium/client_frontend_dist/index.txt +20 -0
- mycelium/client_frontend_dist/next.svg +1 -0
- mycelium/client_frontend_dist/vercel.svg +1 -0
- mycelium/client_frontend_dist/window.svg +1 -0
- mycelium/config.py +346 -0
- mycelium/domain/__init__.py +13 -0
- mycelium/domain/models.py +71 -0
- mycelium/domain/repositories.py +98 -0
- mycelium/domain/worker.py +77 -0
- mycelium/frontend_dist/404.html +1 -0
- mycelium/frontend_dist/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/964-830f77d7ce1c2463.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/_not-found/page-d25eede5a9099bd3.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/layout-9b3d32f96dfe13b6.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/page-a761463485e0540b.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/framework-7c95b8e5103c9e90.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/main-6b37be50736577a2.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/main-app-4153d115599d3126.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/pages/_app-0a0020ddd67f79cf.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/pages/_error-03529f2c21436739.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/webpack-c81e624915b2ea70.js +1 -0
- mycelium/frontend_dist/_next/static/css/1eb7f0e2c78e0734.css +1 -0
- mycelium/frontend_dist/_next/static/glVJ0yJSL0zWN7anTTG3_/_buildManifest.js +1 -0
- mycelium/frontend_dist/_next/static/glVJ0yJSL0zWN7anTTG3_/_ssgManifest.js +1 -0
- mycelium/frontend_dist/favicon.ico +0 -0
- mycelium/frontend_dist/file.svg +1 -0
- mycelium/frontend_dist/globe.svg +1 -0
- mycelium/frontend_dist/index.html +10 -0
- mycelium/frontend_dist/index.txt +20 -0
- mycelium/frontend_dist/next.svg +1 -0
- mycelium/frontend_dist/vercel.svg +1 -0
- mycelium/frontend_dist/window.svg +1 -0
- mycelium/infrastructure/__init__.py +17 -0
- mycelium/infrastructure/chroma_adapter.py +232 -0
- mycelium/infrastructure/clap_adapter.py +280 -0
- mycelium/infrastructure/plex_adapter.py +145 -0
- mycelium/infrastructure/track_database.py +467 -0
- mycelium/main.py +183 -0
- mycelium_ai-0.5.0.dist-info/METADATA +312 -0
- mycelium_ai-0.5.0.dist-info/RECORD +164 -0
- mycelium_ai-0.5.0.dist-info/WHEEL +5 -0
- mycelium_ai-0.5.0.dist-info/entry_points.txt +2 -0
- mycelium_ai-0.5.0.dist-info/licenses/LICENSE +21 -0
- mycelium_ai-0.5.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Optional
|
22
|
+
from pydantic import BaseModel, Field, StrictBool, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class SaveConfigResponse(BaseModel):
|
25
|
+
"""
|
26
|
+
SaveConfigResponse
|
27
|
+
"""
|
28
|
+
message: StrictStr = Field(...)
|
29
|
+
status: StrictStr = Field(...)
|
30
|
+
reloaded: StrictBool = Field(...)
|
31
|
+
reload_error: Optional[StrictStr] = None
|
32
|
+
__properties = ["message", "status", "reloaded", "reload_error"]
|
33
|
+
|
34
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
35
|
+
def to_str(self) -> str:
|
36
|
+
"""Returns the string representation of the model using alias"""
|
37
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
38
|
+
|
39
|
+
def to_json(self) -> str:
|
40
|
+
"""Returns the JSON representation of the model using alias"""
|
41
|
+
return json.dumps(self.to_dict())
|
42
|
+
|
43
|
+
@classmethod
|
44
|
+
def from_json(cls, json_str: str) -> SaveConfigResponse:
|
45
|
+
"""Create an instance of SaveConfigResponse from a JSON string"""
|
46
|
+
return cls.from_dict(json.loads(json_str))
|
47
|
+
|
48
|
+
def to_dict(self):
|
49
|
+
"""Returns the dictionary representation of the model using alias"""
|
50
|
+
_dict = self.model_dump(by_alias=True,
|
51
|
+
exclude={
|
52
|
+
},
|
53
|
+
exclude_none=True)
|
54
|
+
return _dict
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_dict(cls, obj: dict) -> SaveConfigResponse:
|
58
|
+
"""Create an instance of SaveConfigResponse from a dict"""
|
59
|
+
if obj is None:
|
60
|
+
return None
|
61
|
+
|
62
|
+
if not isinstance(obj, dict):
|
63
|
+
return SaveConfigResponse.model_validate(obj)
|
64
|
+
|
65
|
+
_obj = SaveConfigResponse.model_validate({
|
66
|
+
"message": obj.get("message"),
|
67
|
+
"status": obj.get("status"),
|
68
|
+
"reloaded": obj.get("reloaded"),
|
69
|
+
"reload_error": obj.get("reload_error")
|
70
|
+
})
|
71
|
+
return _obj
|
72
|
+
|
73
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Optional
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class WorkerClapSection(BaseModel):
|
25
|
+
"""
|
26
|
+
WorkerClapSection
|
27
|
+
"""
|
28
|
+
model_id: StrictStr = Field(...)
|
29
|
+
target_sr: StrictInt = Field(...)
|
30
|
+
chunk_duration_s: StrictInt = Field(...)
|
31
|
+
num_chunks: StrictInt = Field(...)
|
32
|
+
max_load_duration_s: Optional[StrictInt] = None
|
33
|
+
__properties = ["model_id", "target_sr", "chunk_duration_s", "num_chunks", "max_load_duration_s"]
|
34
|
+
|
35
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
36
|
+
def to_str(self) -> str:
|
37
|
+
"""Returns the string representation of the model using alias"""
|
38
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
39
|
+
|
40
|
+
def to_json(self) -> str:
|
41
|
+
"""Returns the JSON representation of the model using alias"""
|
42
|
+
return json.dumps(self.to_dict())
|
43
|
+
|
44
|
+
@classmethod
|
45
|
+
def from_json(cls, json_str: str) -> WorkerClapSection:
|
46
|
+
"""Create an instance of WorkerClapSection from a JSON string"""
|
47
|
+
return cls.from_dict(json.loads(json_str))
|
48
|
+
|
49
|
+
def to_dict(self):
|
50
|
+
"""Returns the dictionary representation of the model using alias"""
|
51
|
+
_dict = self.model_dump(by_alias=True,
|
52
|
+
exclude={
|
53
|
+
},
|
54
|
+
exclude_none=True)
|
55
|
+
return _dict
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_dict(cls, obj: dict) -> WorkerClapSection:
|
59
|
+
"""Create an instance of WorkerClapSection from a dict"""
|
60
|
+
if obj is None:
|
61
|
+
return None
|
62
|
+
|
63
|
+
if not isinstance(obj, dict):
|
64
|
+
return WorkerClapSection.model_validate(obj)
|
65
|
+
|
66
|
+
_obj = WorkerClapSection.model_validate({
|
67
|
+
"model_id": obj.get("model_id"),
|
68
|
+
"target_sr": obj.get("target_sr"),
|
69
|
+
"chunk_duration_s": obj.get("chunk_duration_s"),
|
70
|
+
"num_chunks": obj.get("num_chunks"),
|
71
|
+
"max_load_duration_s": obj.get("max_load_duration_s")
|
72
|
+
})
|
73
|
+
return _obj
|
74
|
+
|
75
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class WorkerClientAPISection(BaseModel):
|
25
|
+
"""
|
26
|
+
WorkerClientAPISection
|
27
|
+
"""
|
28
|
+
host: StrictStr = Field(...)
|
29
|
+
port: StrictInt = Field(...)
|
30
|
+
__properties = ["host", "port"]
|
31
|
+
|
32
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
33
|
+
def to_str(self) -> str:
|
34
|
+
"""Returns the string representation of the model using alias"""
|
35
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
36
|
+
|
37
|
+
def to_json(self) -> str:
|
38
|
+
"""Returns the JSON representation of the model using alias"""
|
39
|
+
return json.dumps(self.to_dict())
|
40
|
+
|
41
|
+
@classmethod
|
42
|
+
def from_json(cls, json_str: str) -> WorkerClientAPISection:
|
43
|
+
"""Create an instance of WorkerClientAPISection from a JSON string"""
|
44
|
+
return cls.from_dict(json.loads(json_str))
|
45
|
+
|
46
|
+
def to_dict(self):
|
47
|
+
"""Returns the dictionary representation of the model using alias"""
|
48
|
+
_dict = self.model_dump(by_alias=True,
|
49
|
+
exclude={
|
50
|
+
},
|
51
|
+
exclude_none=True)
|
52
|
+
return _dict
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def from_dict(cls, obj: dict) -> WorkerClientAPISection:
|
56
|
+
"""Create an instance of WorkerClientAPISection from a dict"""
|
57
|
+
if obj is None:
|
58
|
+
return None
|
59
|
+
|
60
|
+
if not isinstance(obj, dict):
|
61
|
+
return WorkerClientAPISection.model_validate(obj)
|
62
|
+
|
63
|
+
_obj = WorkerClientAPISection.model_validate({
|
64
|
+
"host": obj.get("host"),
|
65
|
+
"port": obj.get("port")
|
66
|
+
})
|
67
|
+
return _obj
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Union
|
22
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class WorkerClientSection(BaseModel):
|
25
|
+
"""
|
26
|
+
WorkerClientSection
|
27
|
+
"""
|
28
|
+
server_host: StrictStr = Field(...)
|
29
|
+
server_port: StrictInt = Field(...)
|
30
|
+
download_queue_size: StrictInt = Field(...)
|
31
|
+
job_queue_size: StrictInt = Field(...)
|
32
|
+
poll_interval: Union[StrictFloat, StrictInt] = Field(...)
|
33
|
+
download_workers: StrictInt = Field(...)
|
34
|
+
gpu_batch_size: StrictInt = Field(...)
|
35
|
+
__properties = ["server_host", "server_port", "download_queue_size", "job_queue_size", "poll_interval", "download_workers", "gpu_batch_size"]
|
36
|
+
|
37
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
38
|
+
def to_str(self) -> str:
|
39
|
+
"""Returns the string representation of the model using alias"""
|
40
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
41
|
+
|
42
|
+
def to_json(self) -> str:
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
44
|
+
return json.dumps(self.to_dict())
|
45
|
+
|
46
|
+
@classmethod
|
47
|
+
def from_json(cls, json_str: str) -> WorkerClientSection:
|
48
|
+
"""Create an instance of WorkerClientSection from a JSON string"""
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
50
|
+
|
51
|
+
def to_dict(self):
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
53
|
+
_dict = self.model_dump(by_alias=True,
|
54
|
+
exclude={
|
55
|
+
},
|
56
|
+
exclude_none=True)
|
57
|
+
return _dict
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_dict(cls, obj: dict) -> WorkerClientSection:
|
61
|
+
"""Create an instance of WorkerClientSection from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return WorkerClientSection.model_validate(obj)
|
67
|
+
|
68
|
+
_obj = WorkerClientSection.model_validate({
|
69
|
+
"server_host": obj.get("server_host"),
|
70
|
+
"server_port": obj.get("server_port"),
|
71
|
+
"download_queue_size": obj.get("download_queue_size"),
|
72
|
+
"job_queue_size": obj.get("job_queue_size"),
|
73
|
+
"poll_interval": obj.get("poll_interval"),
|
74
|
+
"download_workers": obj.get("download_workers"),
|
75
|
+
"gpu_batch_size": obj.get("gpu_batch_size")
|
76
|
+
})
|
77
|
+
return _obj
|
78
|
+
|
79
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict
|
22
|
+
from pydantic import BaseModel, Field, ConfigDict
|
23
|
+
|
24
|
+
class WorkerConfigRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
WorkerConfigRequest
|
27
|
+
"""
|
28
|
+
client: Dict[str, Any] = Field(...)
|
29
|
+
client_api: Dict[str, Any] = Field(...)
|
30
|
+
clap: Dict[str, Any] = Field(...)
|
31
|
+
logging: Dict[str, Any] = Field(...)
|
32
|
+
__properties = ["client", "client_api", "clap", "logging"]
|
33
|
+
|
34
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
35
|
+
def to_str(self) -> str:
|
36
|
+
"""Returns the string representation of the model using alias"""
|
37
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
38
|
+
|
39
|
+
def to_json(self) -> str:
|
40
|
+
"""Returns the JSON representation of the model using alias"""
|
41
|
+
return json.dumps(self.to_dict())
|
42
|
+
|
43
|
+
@classmethod
|
44
|
+
def from_json(cls, json_str: str) -> WorkerConfigRequest:
|
45
|
+
"""Create an instance of WorkerConfigRequest from a JSON string"""
|
46
|
+
return cls.from_dict(json.loads(json_str))
|
47
|
+
|
48
|
+
def to_dict(self):
|
49
|
+
"""Returns the dictionary representation of the model using alias"""
|
50
|
+
_dict = self.model_dump(by_alias=True,
|
51
|
+
exclude={
|
52
|
+
},
|
53
|
+
exclude_none=True)
|
54
|
+
return _dict
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_dict(cls, obj: dict) -> WorkerConfigRequest:
|
58
|
+
"""Create an instance of WorkerConfigRequest from a dict"""
|
59
|
+
if obj is None:
|
60
|
+
return None
|
61
|
+
|
62
|
+
if not isinstance(obj, dict):
|
63
|
+
return WorkerConfigRequest.model_validate(obj)
|
64
|
+
|
65
|
+
_obj = WorkerConfigRequest.model_validate({
|
66
|
+
"client": obj.get("client"),
|
67
|
+
"client_api": obj.get("client_api"),
|
68
|
+
"clap": obj.get("clap"),
|
69
|
+
"logging": obj.get("logging")
|
70
|
+
})
|
71
|
+
return _obj
|
72
|
+
|
73
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
from pydantic import BaseModel, Field, ConfigDict
|
23
|
+
from mycelium.api.generated_sources.worker_schemas.models.worker_clap_section import WorkerClapSection
|
24
|
+
from mycelium.api.generated_sources.worker_schemas.models.worker_client_api_section import WorkerClientAPISection
|
25
|
+
from mycelium.api.generated_sources.worker_schemas.models.worker_client_section import WorkerClientSection
|
26
|
+
from mycelium.api.generated_sources.worker_schemas.models.worker_logging_section import WorkerLoggingSection
|
27
|
+
|
28
|
+
class WorkerConfigResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
WorkerConfigResponse
|
31
|
+
"""
|
32
|
+
client: WorkerClientSection = Field(...)
|
33
|
+
client_api: WorkerClientAPISection = Field(...)
|
34
|
+
clap: WorkerClapSection = Field(...)
|
35
|
+
logging: WorkerLoggingSection = Field(...)
|
36
|
+
__properties = ["client", "client_api", "clap", "logging"]
|
37
|
+
|
38
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> WorkerConfigResponse:
|
49
|
+
"""Create an instance of WorkerConfigResponse from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.model_dump(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of client
|
59
|
+
if self.client:
|
60
|
+
_dict['client'] = self.client.to_dict()
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of client_api
|
62
|
+
if self.client_api:
|
63
|
+
_dict['client_api'] = self.client_api.to_dict()
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of clap
|
65
|
+
if self.clap:
|
66
|
+
_dict['clap'] = self.clap.to_dict()
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of logging
|
68
|
+
if self.logging:
|
69
|
+
_dict['logging'] = self.logging.to_dict()
|
70
|
+
return _dict
|
71
|
+
|
72
|
+
@classmethod
|
73
|
+
def from_dict(cls, obj: dict) -> WorkerConfigResponse:
|
74
|
+
"""Create an instance of WorkerConfigResponse from a dict"""
|
75
|
+
if obj is None:
|
76
|
+
return None
|
77
|
+
|
78
|
+
if not isinstance(obj, dict):
|
79
|
+
return WorkerConfigResponse.model_validate(obj)
|
80
|
+
|
81
|
+
_obj = WorkerConfigResponse.model_validate({
|
82
|
+
"client": WorkerClientSection.from_dict(obj.get("client")) if obj.get("client") is not None else None,
|
83
|
+
"client_api": WorkerClientAPISection.from_dict(obj.get("client_api")) if obj.get("client_api") is not None else None,
|
84
|
+
"clap": WorkerClapSection.from_dict(obj.get("clap")) if obj.get("clap") is not None else None,
|
85
|
+
"logging": WorkerLoggingSection.from_dict(obj.get("logging")) if obj.get("logging") is not None else None
|
86
|
+
})
|
87
|
+
return _obj
|
88
|
+
|
89
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium Worker (Client) API
|
5
|
+
|
6
|
+
Configuration API for Mycelium client workers
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class WorkerLoggingSection(BaseModel):
|
25
|
+
"""
|
26
|
+
WorkerLoggingSection
|
27
|
+
"""
|
28
|
+
level: StrictStr = Field(...)
|
29
|
+
__properties = ["level"]
|
30
|
+
|
31
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
32
|
+
def to_str(self) -> str:
|
33
|
+
"""Returns the string representation of the model using alias"""
|
34
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
35
|
+
|
36
|
+
def to_json(self) -> str:
|
37
|
+
"""Returns the JSON representation of the model using alias"""
|
38
|
+
return json.dumps(self.to_dict())
|
39
|
+
|
40
|
+
@classmethod
|
41
|
+
def from_json(cls, json_str: str) -> WorkerLoggingSection:
|
42
|
+
"""Create an instance of WorkerLoggingSection from a JSON string"""
|
43
|
+
return cls.from_dict(json.loads(json_str))
|
44
|
+
|
45
|
+
def to_dict(self):
|
46
|
+
"""Returns the dictionary representation of the model using alias"""
|
47
|
+
_dict = self.model_dump(by_alias=True,
|
48
|
+
exclude={
|
49
|
+
},
|
50
|
+
exclude_none=True)
|
51
|
+
return _dict
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_dict(cls, obj: dict) -> WorkerLoggingSection:
|
55
|
+
"""Create an instance of WorkerLoggingSection from a dict"""
|
56
|
+
if obj is None:
|
57
|
+
return None
|
58
|
+
|
59
|
+
if not isinstance(obj, dict):
|
60
|
+
return WorkerLoggingSection.model_validate(obj)
|
61
|
+
|
62
|
+
_obj = WorkerLoggingSection.model_validate({
|
63
|
+
"level": obj.get("level")
|
64
|
+
})
|
65
|
+
return _obj
|
66
|
+
|
67
|
+
|