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,71 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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, StrictBool, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class APISection(BaseModel):
|
25
|
+
"""
|
26
|
+
APISection
|
27
|
+
"""
|
28
|
+
host: StrictStr = Field(...)
|
29
|
+
port: StrictInt = Field(...)
|
30
|
+
reload: StrictBool = Field(...)
|
31
|
+
__properties = ["host", "port", "reload"]
|
32
|
+
|
33
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
34
|
+
def to_str(self) -> str:
|
35
|
+
"""Returns the string representation of the model using alias"""
|
36
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
37
|
+
|
38
|
+
def to_json(self) -> str:
|
39
|
+
"""Returns the JSON representation of the model using alias"""
|
40
|
+
return json.dumps(self.to_dict())
|
41
|
+
|
42
|
+
@classmethod
|
43
|
+
def from_json(cls, json_str: str) -> APISection:
|
44
|
+
"""Create an instance of APISection from a JSON string"""
|
45
|
+
return cls.from_dict(json.loads(json_str))
|
46
|
+
|
47
|
+
def to_dict(self):
|
48
|
+
"""Returns the dictionary representation of the model using alias"""
|
49
|
+
_dict = self.model_dump(by_alias=True,
|
50
|
+
exclude={
|
51
|
+
},
|
52
|
+
exclude_none=True)
|
53
|
+
return _dict
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_dict(cls, obj: dict) -> APISection:
|
57
|
+
"""Create an instance of APISection from a dict"""
|
58
|
+
if obj is None:
|
59
|
+
return None
|
60
|
+
|
61
|
+
if not isinstance(obj, dict):
|
62
|
+
return APISection.model_validate(obj)
|
63
|
+
|
64
|
+
_obj = APISection.model_validate({
|
65
|
+
"host": obj.get("host"),
|
66
|
+
"port": obj.get("port"),
|
67
|
+
"reload": obj.get("reload")
|
68
|
+
})
|
69
|
+
return _obj
|
70
|
+
|
71
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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 ChromaSection(BaseModel):
|
25
|
+
"""
|
26
|
+
ChromaSection
|
27
|
+
"""
|
28
|
+
collection_name: StrictStr = Field(...)
|
29
|
+
batch_size: StrictInt = Field(...)
|
30
|
+
__properties = ["collection_name", "batch_size"]
|
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) -> ChromaSection:
|
43
|
+
"""Create an instance of ChromaSection 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) -> ChromaSection:
|
56
|
+
"""Create an instance of ChromaSection from a dict"""
|
57
|
+
if obj is None:
|
58
|
+
return None
|
59
|
+
|
60
|
+
if not isinstance(obj, dict):
|
61
|
+
return ChromaSection.model_validate(obj)
|
62
|
+
|
63
|
+
_obj = ChromaSection.model_validate({
|
64
|
+
"collection_name": obj.get("collection_name"),
|
65
|
+
"batch_size": obj.get("batch_size")
|
66
|
+
})
|
67
|
+
return _obj
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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 ClapSection(BaseModel):
|
25
|
+
"""
|
26
|
+
ClapSection
|
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) -> ClapSection:
|
46
|
+
"""Create an instance of ClapSection 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) -> ClapSection:
|
59
|
+
"""Create an instance of ClapSection from a dict"""
|
60
|
+
if obj is None:
|
61
|
+
return None
|
62
|
+
|
63
|
+
if not isinstance(obj, dict):
|
64
|
+
return ClapSection.model_validate(obj)
|
65
|
+
|
66
|
+
_obj = ClapSection.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,79 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class ComputeOnServer200Response(BaseModel):
|
25
|
+
"""
|
26
|
+
ComputeOnServer200Response
|
27
|
+
"""
|
28
|
+
message: Optional[StrictStr] = None
|
29
|
+
additional_properties: Dict[str, Any] = {}
|
30
|
+
__properties = ["message"]
|
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) -> ComputeOnServer200Response:
|
43
|
+
"""Create an instance of ComputeOnServer200Response 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
|
+
"additional_properties"
|
51
|
+
},
|
52
|
+
exclude_none=True)
|
53
|
+
# puts key-value pairs in additional_properties in the top level
|
54
|
+
if self.additional_properties is not None:
|
55
|
+
for _key, _value in self.additional_properties.items():
|
56
|
+
_dict[_key] = _value
|
57
|
+
|
58
|
+
return _dict
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_dict(cls, obj: dict) -> ComputeOnServer200Response:
|
62
|
+
"""Create an instance of ComputeOnServer200Response from a dict"""
|
63
|
+
if obj is None:
|
64
|
+
return None
|
65
|
+
|
66
|
+
if not isinstance(obj, dict):
|
67
|
+
return ComputeOnServer200Response.model_validate(obj)
|
68
|
+
|
69
|
+
_obj = ComputeOnServer200Response.model_validate({
|
70
|
+
"message": obj.get("message")
|
71
|
+
})
|
72
|
+
# store additional fields in additional_properties
|
73
|
+
for _key in obj.keys():
|
74
|
+
if _key not in cls.__properties:
|
75
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
76
|
+
|
77
|
+
return _obj
|
78
|
+
|
79
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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 ComputeOnServerRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
ComputeOnServerRequest
|
27
|
+
"""
|
28
|
+
track_id: StrictStr = Field(...)
|
29
|
+
__properties = ["track_id"]
|
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) -> ComputeOnServerRequest:
|
42
|
+
"""Create an instance of ComputeOnServerRequest 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) -> ComputeOnServerRequest:
|
55
|
+
"""Create an instance of ComputeOnServerRequest from a dict"""
|
56
|
+
if obj is None:
|
57
|
+
return None
|
58
|
+
|
59
|
+
if not isinstance(obj, dict):
|
60
|
+
return ComputeOnServerRequest.model_validate(obj)
|
61
|
+
|
62
|
+
_obj = ComputeOnServerRequest.model_validate({
|
63
|
+
"track_id": obj.get("track_id")
|
64
|
+
})
|
65
|
+
return _obj
|
66
|
+
|
67
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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 ComputeTextSearchRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
ComputeTextSearchRequest
|
27
|
+
"""
|
28
|
+
query: StrictStr = Field(...)
|
29
|
+
n_results: Optional[StrictInt] = 10
|
30
|
+
__properties = ["query", "n_results"]
|
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) -> ComputeTextSearchRequest:
|
43
|
+
"""Create an instance of ComputeTextSearchRequest 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) -> ComputeTextSearchRequest:
|
56
|
+
"""Create an instance of ComputeTextSearchRequest from a dict"""
|
57
|
+
if obj is None:
|
58
|
+
return None
|
59
|
+
|
60
|
+
if not isinstance(obj, dict):
|
61
|
+
return ComputeTextSearchRequest.model_validate(obj)
|
62
|
+
|
63
|
+
_obj = ComputeTextSearchRequest.model_validate({
|
64
|
+
"query": obj.get("query"),
|
65
|
+
"n_results": obj.get("n_results") if obj.get("n_results") is not None else 10
|
66
|
+
})
|
67
|
+
return _obj
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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, Optional
|
22
|
+
from pydantic import BaseModel, Field, ConfigDict
|
23
|
+
|
24
|
+
class ConfigRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
ConfigRequest
|
27
|
+
"""
|
28
|
+
media_server: Dict[str, Any] = Field(...)
|
29
|
+
plex: Dict[str, Any] = Field(...)
|
30
|
+
api: Dict[str, Any] = Field(...)
|
31
|
+
chroma: Dict[str, Any] = Field(...)
|
32
|
+
clap: Dict[str, Any] = Field(...)
|
33
|
+
server: Dict[str, Any] = Field(...)
|
34
|
+
logging: Dict[str, Any] = Field(...)
|
35
|
+
database: Optional[Dict[str, Any]] = None
|
36
|
+
__properties = ["media_server", "plex", "api", "chroma", "clap", "server", "logging", "database"]
|
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) -> ConfigRequest:
|
49
|
+
"""Create an instance of ConfigRequest 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
|
+
return _dict
|
59
|
+
|
60
|
+
@classmethod
|
61
|
+
def from_dict(cls, obj: dict) -> ConfigRequest:
|
62
|
+
"""Create an instance of ConfigRequest from a dict"""
|
63
|
+
if obj is None:
|
64
|
+
return None
|
65
|
+
|
66
|
+
if not isinstance(obj, dict):
|
67
|
+
return ConfigRequest.model_validate(obj)
|
68
|
+
|
69
|
+
_obj = ConfigRequest.model_validate({
|
70
|
+
"media_server": obj.get("media_server"),
|
71
|
+
"plex": obj.get("plex"),
|
72
|
+
"api": obj.get("api"),
|
73
|
+
"chroma": obj.get("chroma"),
|
74
|
+
"clap": obj.get("clap"),
|
75
|
+
"server": obj.get("server"),
|
76
|
+
"logging": obj.get("logging"),
|
77
|
+
"database": obj.get("database")
|
78
|
+
})
|
79
|
+
return _obj
|
80
|
+
|
81
|
+
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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.server_schemas.models.api_section import APISection
|
24
|
+
from mycelium.api.generated_sources.server_schemas.models.chroma_section import ChromaSection
|
25
|
+
from mycelium.api.generated_sources.server_schemas.models.clap_section import ClapSection
|
26
|
+
from mycelium.api.generated_sources.server_schemas.models.logging_section import LoggingSection
|
27
|
+
from mycelium.api.generated_sources.server_schemas.models.media_server_section import MediaServerSection
|
28
|
+
from mycelium.api.generated_sources.server_schemas.models.plex_section import PlexSection
|
29
|
+
from mycelium.api.generated_sources.server_schemas.models.server_section import ServerSection
|
30
|
+
|
31
|
+
class ConfigResponse(BaseModel):
|
32
|
+
"""
|
33
|
+
ConfigResponse
|
34
|
+
"""
|
35
|
+
media_server: MediaServerSection = Field(...)
|
36
|
+
plex: PlexSection = Field(...)
|
37
|
+
server: ServerSection = Field(...)
|
38
|
+
api: APISection = Field(...)
|
39
|
+
chroma: ChromaSection = Field(...)
|
40
|
+
clap: ClapSection = Field(...)
|
41
|
+
logging: LoggingSection = Field(...)
|
42
|
+
__properties = ["media_server", "plex", "server", "api", "chroma", "clap", "logging"]
|
43
|
+
|
44
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
45
|
+
def to_str(self) -> str:
|
46
|
+
"""Returns the string representation of the model using alias"""
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
48
|
+
|
49
|
+
def to_json(self) -> str:
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
51
|
+
return json.dumps(self.to_dict())
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_json(cls, json_str: str) -> ConfigResponse:
|
55
|
+
"""Create an instance of ConfigResponse from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self):
|
59
|
+
"""Returns the dictionary representation of the model using alias"""
|
60
|
+
_dict = self.model_dump(by_alias=True,
|
61
|
+
exclude={
|
62
|
+
},
|
63
|
+
exclude_none=True)
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of media_server
|
65
|
+
if self.media_server:
|
66
|
+
_dict['media_server'] = self.media_server.to_dict()
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of plex
|
68
|
+
if self.plex:
|
69
|
+
_dict['plex'] = self.plex.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of server
|
71
|
+
if self.server:
|
72
|
+
_dict['server'] = self.server.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of api
|
74
|
+
if self.api:
|
75
|
+
_dict['api'] = self.api.to_dict()
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of chroma
|
77
|
+
if self.chroma:
|
78
|
+
_dict['chroma'] = self.chroma.to_dict()
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of clap
|
80
|
+
if self.clap:
|
81
|
+
_dict['clap'] = self.clap.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of logging
|
83
|
+
if self.logging:
|
84
|
+
_dict['logging'] = self.logging.to_dict()
|
85
|
+
return _dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls, obj: dict) -> ConfigResponse:
|
89
|
+
"""Create an instance of ConfigResponse from a dict"""
|
90
|
+
if obj is None:
|
91
|
+
return None
|
92
|
+
|
93
|
+
if not isinstance(obj, dict):
|
94
|
+
return ConfigResponse.model_validate(obj)
|
95
|
+
|
96
|
+
_obj = ConfigResponse.model_validate({
|
97
|
+
"media_server": MediaServerSection.from_dict(obj.get("media_server")) if obj.get("media_server") is not None else None,
|
98
|
+
"plex": PlexSection.from_dict(obj.get("plex")) if obj.get("plex") is not None else None,
|
99
|
+
"server": ServerSection.from_dict(obj.get("server")) if obj.get("server") is not None else None,
|
100
|
+
"api": APISection.from_dict(obj.get("api")) if obj.get("api") is not None else None,
|
101
|
+
"chroma": ChromaSection.from_dict(obj.get("chroma")) if obj.get("chroma") is not None else None,
|
102
|
+
"clap": ClapSection.from_dict(obj.get("clap")) if obj.get("clap") is not None else None,
|
103
|
+
"logging": LoggingSection.from_dict(obj.get("logging")) if obj.get("logging") is not None else None
|
104
|
+
})
|
105
|
+
return _obj
|
106
|
+
|
107
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
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 List, Optional
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist, ConfigDict
|
23
|
+
|
24
|
+
class CreatePlaylistRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
CreatePlaylistRequest
|
27
|
+
"""
|
28
|
+
name: StrictStr = Field(...)
|
29
|
+
track_ids: conlist(StrictStr) = Field(...)
|
30
|
+
batch_size: Optional[StrictInt] = 100
|
31
|
+
__properties = ["name", "track_ids", "batch_size"]
|
32
|
+
|
33
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
34
|
+
def to_str(self) -> str:
|
35
|
+
"""Returns the string representation of the model using alias"""
|
36
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
37
|
+
|
38
|
+
def to_json(self) -> str:
|
39
|
+
"""Returns the JSON representation of the model using alias"""
|
40
|
+
return json.dumps(self.to_dict())
|
41
|
+
|
42
|
+
@classmethod
|
43
|
+
def from_json(cls, json_str: str) -> CreatePlaylistRequest:
|
44
|
+
"""Create an instance of CreatePlaylistRequest from a JSON string"""
|
45
|
+
return cls.from_dict(json.loads(json_str))
|
46
|
+
|
47
|
+
def to_dict(self):
|
48
|
+
"""Returns the dictionary representation of the model using alias"""
|
49
|
+
_dict = self.model_dump(by_alias=True,
|
50
|
+
exclude={
|
51
|
+
},
|
52
|
+
exclude_none=True)
|
53
|
+
return _dict
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_dict(cls, obj: dict) -> CreatePlaylistRequest:
|
57
|
+
"""Create an instance of CreatePlaylistRequest from a dict"""
|
58
|
+
if obj is None:
|
59
|
+
return None
|
60
|
+
|
61
|
+
if not isinstance(obj, dict):
|
62
|
+
return CreatePlaylistRequest.model_validate(obj)
|
63
|
+
|
64
|
+
_obj = CreatePlaylistRequest.model_validate({
|
65
|
+
"name": obj.get("name"),
|
66
|
+
"track_ids": obj.get("track_ids"),
|
67
|
+
"batch_size": obj.get("batch_size") if obj.get("batch_size") is not None else 100
|
68
|
+
})
|
69
|
+
return _obj
|
70
|
+
|
71
|
+
|