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,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
|
+
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class ScanLibraryResponse(BaseModel):
|
25
|
+
"""
|
26
|
+
ScanLibraryResponse
|
27
|
+
"""
|
28
|
+
message: StrictStr = Field(...)
|
29
|
+
total_tracks: StrictInt = Field(...)
|
30
|
+
new_tracks: StrictInt = Field(...)
|
31
|
+
updated_tracks: StrictInt = Field(...)
|
32
|
+
scan_timestamp: StrictStr = Field(...)
|
33
|
+
__properties = ["message", "total_tracks", "new_tracks", "updated_tracks", "scan_timestamp"]
|
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) -> ScanLibraryResponse:
|
46
|
+
"""Create an instance of ScanLibraryResponse 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) -> ScanLibraryResponse:
|
59
|
+
"""Create an instance of ScanLibraryResponse from a dict"""
|
60
|
+
if obj is None:
|
61
|
+
return None
|
62
|
+
|
63
|
+
if not isinstance(obj, dict):
|
64
|
+
return ScanLibraryResponse.model_validate(obj)
|
65
|
+
|
66
|
+
_obj = ScanLibraryResponse.model_validate({
|
67
|
+
"message": obj.get("message"),
|
68
|
+
"total_tracks": obj.get("total_tracks"),
|
69
|
+
"new_tracks": obj.get("new_tracks"),
|
70
|
+
"updated_tracks": obj.get("updated_tracks"),
|
71
|
+
"scan_timestamp": obj.get("scan_timestamp")
|
72
|
+
})
|
73
|
+
return _obj
|
74
|
+
|
75
|
+
|
@@ -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 Union
|
22
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, ConfigDict
|
23
|
+
from mycelium.api.generated_sources.server_schemas.models.track_response import TrackResponse
|
24
|
+
|
25
|
+
class SearchResultResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
SearchResultResponse
|
28
|
+
"""
|
29
|
+
track: TrackResponse = Field(...)
|
30
|
+
similarity_score: Union[StrictFloat, StrictInt] = Field(...)
|
31
|
+
distance: Union[StrictFloat, StrictInt] = Field(...)
|
32
|
+
__properties = ["track", "similarity_score", "distance"]
|
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) -> SearchResultResponse:
|
45
|
+
"""Create an instance of SearchResultResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of track
|
55
|
+
if self.track:
|
56
|
+
_dict['track'] = self.track.to_dict()
|
57
|
+
return _dict
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_dict(cls, obj: dict) -> SearchResultResponse:
|
61
|
+
"""Create an instance of SearchResultResponse from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return SearchResultResponse.model_validate(obj)
|
67
|
+
|
68
|
+
_obj = SearchResultResponse.model_validate({
|
69
|
+
"track": TrackResponse.from_dict(obj.get("track")) if obj.get("track") is not None else None,
|
70
|
+
"similarity_score": obj.get("similarity_score"),
|
71
|
+
"distance": obj.get("distance")
|
72
|
+
})
|
73
|
+
return _obj
|
74
|
+
|
75
|
+
|
@@ -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, StrictInt, ConfigDict
|
23
|
+
|
24
|
+
class ServerSection(BaseModel):
|
25
|
+
"""
|
26
|
+
ServerSection
|
27
|
+
"""
|
28
|
+
gpu_batch_size: StrictInt = Field(...)
|
29
|
+
__properties = ["gpu_batch_size"]
|
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) -> ServerSection:
|
42
|
+
"""Create an instance of ServerSection 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) -> ServerSection:
|
55
|
+
"""Create an instance of ServerSection from a dict"""
|
56
|
+
if obj is None:
|
57
|
+
return None
|
58
|
+
|
59
|
+
if not isinstance(obj, dict):
|
60
|
+
return ServerSection.model_validate(obj)
|
61
|
+
|
62
|
+
_obj = ServerSection.model_validate({
|
63
|
+
"gpu_batch_size": obj.get("gpu_batch_size")
|
64
|
+
})
|
65
|
+
return _obj
|
66
|
+
|
67
|
+
|
@@ -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 Optional
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr, ConfigDict
|
23
|
+
|
24
|
+
class StopProcessingResponse(BaseModel):
|
25
|
+
"""
|
26
|
+
StopProcessingResponse
|
27
|
+
"""
|
28
|
+
message: StrictStr = Field(...)
|
29
|
+
type: Optional[StrictStr] = None
|
30
|
+
cleared_tasks: Optional[StrictInt] = None
|
31
|
+
__properties = ["message", "type", "cleared_tasks"]
|
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) -> StopProcessingResponse:
|
44
|
+
"""Create an instance of StopProcessingResponse 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) -> StopProcessingResponse:
|
57
|
+
"""Create an instance of StopProcessingResponse from a dict"""
|
58
|
+
if obj is None:
|
59
|
+
return None
|
60
|
+
|
61
|
+
if not isinstance(obj, dict):
|
62
|
+
return StopProcessingResponse.model_validate(obj)
|
63
|
+
|
64
|
+
_obj = StopProcessingResponse.model_validate({
|
65
|
+
"message": obj.get("message"),
|
66
|
+
"type": obj.get("type"),
|
67
|
+
"cleared_tasks": obj.get("cleared_tasks")
|
68
|
+
})
|
69
|
+
return _obj
|
70
|
+
|
71
|
+
|
@@ -0,0 +1,87 @@
|
|
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, StrictStr, conlist, ConfigDict
|
23
|
+
from mycelium.api.generated_sources.server_schemas.models.search_result_response import SearchResultResponse
|
24
|
+
|
25
|
+
class TaskStatusResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
TaskStatusResponse
|
28
|
+
"""
|
29
|
+
task_id: StrictStr = Field(...)
|
30
|
+
status: StrictStr = Field(...)
|
31
|
+
track_id: Optional[StrictStr] = None
|
32
|
+
started_at: Optional[StrictStr] = None
|
33
|
+
completed_at: Optional[StrictStr] = None
|
34
|
+
error_message: Optional[StrictStr] = None
|
35
|
+
search_results: Optional[conlist(SearchResultResponse)] = None
|
36
|
+
__properties = ["task_id", "status", "track_id", "started_at", "completed_at", "error_message", "search_results"]
|
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) -> TaskStatusResponse:
|
49
|
+
"""Create an instance of TaskStatusResponse 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 each item in search_results (list)
|
59
|
+
_items = []
|
60
|
+
if self.search_results:
|
61
|
+
for _item in self.search_results:
|
62
|
+
if _item:
|
63
|
+
_items.append(_item.to_dict())
|
64
|
+
_dict['search_results'] = _items
|
65
|
+
return _dict
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_dict(cls, obj: dict) -> TaskStatusResponse:
|
69
|
+
"""Create an instance of TaskStatusResponse from a dict"""
|
70
|
+
if obj is None:
|
71
|
+
return None
|
72
|
+
|
73
|
+
if not isinstance(obj, dict):
|
74
|
+
return TaskStatusResponse.model_validate(obj)
|
75
|
+
|
76
|
+
_obj = TaskStatusResponse.model_validate({
|
77
|
+
"task_id": obj.get("task_id"),
|
78
|
+
"status": obj.get("status"),
|
79
|
+
"track_id": obj.get("track_id"),
|
80
|
+
"started_at": obj.get("started_at"),
|
81
|
+
"completed_at": obj.get("completed_at"),
|
82
|
+
"error_message": obj.get("error_message"),
|
83
|
+
"search_results": [SearchResultResponse.from_dict(_item) for _item in obj.get("search_results")] if obj.get("search_results") is not None else None
|
84
|
+
})
|
85
|
+
return _obj
|
86
|
+
|
87
|
+
|
@@ -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, Union
|
22
|
+
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, ConfigDict
|
23
|
+
|
24
|
+
class TrackDatabaseStats(BaseModel):
|
25
|
+
"""
|
26
|
+
TrackDatabaseStats
|
27
|
+
"""
|
28
|
+
total_tracks: StrictInt = Field(...)
|
29
|
+
processed_tracks: StrictInt = Field(...)
|
30
|
+
unprocessed_tracks: StrictInt = Field(...)
|
31
|
+
progress_percentage: Union[StrictFloat, StrictInt] = Field(...)
|
32
|
+
is_processing: Optional[StrictBool] = None
|
33
|
+
__properties = ["total_tracks", "processed_tracks", "unprocessed_tracks", "progress_percentage", "is_processing"]
|
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) -> TrackDatabaseStats:
|
46
|
+
"""Create an instance of TrackDatabaseStats 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) -> TrackDatabaseStats:
|
59
|
+
"""Create an instance of TrackDatabaseStats from a dict"""
|
60
|
+
if obj is None:
|
61
|
+
return None
|
62
|
+
|
63
|
+
if not isinstance(obj, dict):
|
64
|
+
return TrackDatabaseStats.model_validate(obj)
|
65
|
+
|
66
|
+
_obj = TrackDatabaseStats.model_validate({
|
67
|
+
"total_tracks": obj.get("total_tracks"),
|
68
|
+
"processed_tracks": obj.get("processed_tracks"),
|
69
|
+
"unprocessed_tracks": obj.get("unprocessed_tracks"),
|
70
|
+
"progress_percentage": obj.get("progress_percentage"),
|
71
|
+
"is_processing": obj.get("is_processing")
|
72
|
+
})
|
73
|
+
return _obj
|
74
|
+
|
75
|
+
|
@@ -0,0 +1,77 @@
|
|
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 TrackResponse(BaseModel):
|
25
|
+
"""
|
26
|
+
TrackResponse
|
27
|
+
"""
|
28
|
+
artist: StrictStr = Field(...)
|
29
|
+
album: StrictStr = Field(...)
|
30
|
+
title: StrictStr = Field(...)
|
31
|
+
filepath: StrictStr = Field(...)
|
32
|
+
media_server_rating_key: StrictStr = Field(...)
|
33
|
+
media_server_type: StrictStr = Field(...)
|
34
|
+
__properties = ["artist", "album", "title", "filepath", "media_server_rating_key", "media_server_type"]
|
35
|
+
|
36
|
+
model_config = {"populate_by_name": True, "validate_assignment": True}
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> TrackResponse:
|
47
|
+
"""Create an instance of TrackResponse from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.model_dump(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> TrackResponse:
|
60
|
+
"""Create an instance of TrackResponse from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return TrackResponse.model_validate(obj)
|
66
|
+
|
67
|
+
_obj = TrackResponse.model_validate({
|
68
|
+
"artist": obj.get("artist"),
|
69
|
+
"album": obj.get("album"),
|
70
|
+
"title": obj.get("title"),
|
71
|
+
"filepath": obj.get("filepath"),
|
72
|
+
"media_server_rating_key": obj.get("media_server_rating_key"),
|
73
|
+
"media_server_type": obj.get("media_server_type")
|
74
|
+
})
|
75
|
+
return _obj
|
76
|
+
|
77
|
+
|
@@ -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 List
|
22
|
+
from pydantic import BaseModel, Field, StrictInt, conlist, ConfigDict
|
23
|
+
from mycelium.api.generated_sources.server_schemas.models.track_response import TrackResponse
|
24
|
+
|
25
|
+
class TracksListResponse(BaseModel):
|
26
|
+
"""
|
27
|
+
TracksListResponse
|
28
|
+
"""
|
29
|
+
tracks: conlist(TrackResponse) = Field(...)
|
30
|
+
total_count: StrictInt = Field(...)
|
31
|
+
page: StrictInt = Field(...)
|
32
|
+
limit: StrictInt = Field(...)
|
33
|
+
__properties = ["tracks", "total_count", "page", "limit"]
|
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) -> TracksListResponse:
|
46
|
+
"""Create an instance of TracksListResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in tracks (list)
|
56
|
+
_items = []
|
57
|
+
if self.tracks:
|
58
|
+
for _item in self.tracks:
|
59
|
+
if _item:
|
60
|
+
_items.append(_item.to_dict())
|
61
|
+
_dict['tracks'] = _items
|
62
|
+
return _dict
|
63
|
+
|
64
|
+
@classmethod
|
65
|
+
def from_dict(cls, obj: dict) -> TracksListResponse:
|
66
|
+
"""Create an instance of TracksListResponse from a dict"""
|
67
|
+
if obj is None:
|
68
|
+
return None
|
69
|
+
|
70
|
+
if not isinstance(obj, dict):
|
71
|
+
return TracksListResponse.model_validate(obj)
|
72
|
+
|
73
|
+
_obj = TracksListResponse.model_validate({
|
74
|
+
"tracks": [TrackResponse.from_dict(_item) for _item in obj.get("tracks")] if obj.get("tracks") is not None else None,
|
75
|
+
"total_count": obj.get("total_count"),
|
76
|
+
"page": obj.get("page"),
|
77
|
+
"limit": obj.get("limit")
|
78
|
+
})
|
79
|
+
return _obj
|
80
|
+
|
81
|
+
|