unitysvc-services 0.2.4__py3-none-any.whl → 0.2.6__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.
- unitysvc_services/models/listing_v1.py +6 -6
- unitysvc_services/publisher.py +4 -0
- unitysvc_services/query.py +6 -17
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/METADATA +1 -1
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/RECORD +9 -9
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/WHEEL +0 -0
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/entry_points.txt +0 -0
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/licenses/LICENSE +0 -0
- {unitysvc_services-0.2.4.dist-info → unitysvc_services-0.2.6.dist-info}/top_level.txt +0 -0
@@ -3,12 +3,7 @@ from typing import Any
|
|
3
3
|
|
4
4
|
from pydantic import BaseModel, ConfigDict, Field
|
5
5
|
|
6
|
-
from unitysvc_services.models.base import
|
7
|
-
AccessInterface,
|
8
|
-
Document,
|
9
|
-
ListingStatusEnum,
|
10
|
-
Pricing,
|
11
|
-
)
|
6
|
+
from unitysvc_services.models.base import AccessInterface, Document, ListingStatusEnum, Pricing
|
12
7
|
|
13
8
|
|
14
9
|
class ListingV1(BaseModel):
|
@@ -32,6 +27,11 @@ class ListingV1(BaseModel):
|
|
32
27
|
|
33
28
|
seller_name: str | None = Field(default=None, description="Name of the seller offering this service listing")
|
34
29
|
|
30
|
+
name: str | None = Field(
|
31
|
+
default=None,
|
32
|
+
max_length=255,
|
33
|
+
description="Name identifier for the service listing, default to filename",
|
34
|
+
)
|
35
35
|
# unique name for each provider, usually following upstream naming convention
|
36
36
|
# status of the service, public, deprecated etc
|
37
37
|
listing_status: ListingStatusEnum = Field(
|
unitysvc_services/publisher.py
CHANGED
@@ -159,6 +159,10 @@ class ServiceDataPublisher:
|
|
159
159
|
# Load the listing data file
|
160
160
|
data = self.load_data_file(data_file)
|
161
161
|
|
162
|
+
# If name is not provided, use filename (without extension)
|
163
|
+
if "name" not in data or not data.get("name"):
|
164
|
+
data["name"] = data_file.stem
|
165
|
+
|
162
166
|
# Resolve file references and include content
|
163
167
|
base_path = data_file.parent
|
164
168
|
data_with_content = self.resolve_file_references(data, base_path)
|
unitysvc_services/query.py
CHANGED
@@ -46,10 +46,7 @@ class ServiceDataQuery:
|
|
46
46
|
skip: Number of records to skip (for pagination)
|
47
47
|
limit: Maximum number of records to return
|
48
48
|
"""
|
49
|
-
response = self.client.get(
|
50
|
-
f"{self.base_url}/publish/offerings",
|
51
|
-
params={"skip": skip, "limit": limit}
|
52
|
-
)
|
49
|
+
response = self.client.get(f"{self.base_url}/publish/offerings", params={"skip": skip, "limit": limit})
|
53
50
|
response.raise_for_status()
|
54
51
|
result = response.json()
|
55
52
|
return result.get("data", result) if isinstance(result, dict) else result
|
@@ -61,10 +58,7 @@ class ServiceDataQuery:
|
|
61
58
|
skip: Number of records to skip (for pagination)
|
62
59
|
limit: Maximum number of records to return
|
63
60
|
"""
|
64
|
-
response = self.client.get(
|
65
|
-
f"{self.base_url}/publish/listings",
|
66
|
-
params={"skip": skip, "limit": limit}
|
67
|
-
)
|
61
|
+
response = self.client.get(f"{self.base_url}/publish/listings", params={"skip": skip, "limit": limit})
|
68
62
|
response.raise_for_status()
|
69
63
|
result = response.json()
|
70
64
|
return result.get("data", result) if isinstance(result, dict) else result
|
@@ -76,10 +70,7 @@ class ServiceDataQuery:
|
|
76
70
|
skip: Number of records to skip (for pagination)
|
77
71
|
limit: Maximum number of records to return
|
78
72
|
"""
|
79
|
-
response = self.client.get(
|
80
|
-
f"{self.base_url}/publish/providers",
|
81
|
-
params={"skip": skip, "limit": limit}
|
82
|
-
)
|
73
|
+
response = self.client.get(f"{self.base_url}/publish/providers", params={"skip": skip, "limit": limit})
|
83
74
|
response.raise_for_status()
|
84
75
|
result = response.json()
|
85
76
|
return result.get("data", result) if isinstance(result, dict) else result
|
@@ -91,10 +82,7 @@ class ServiceDataQuery:
|
|
91
82
|
skip: Number of records to skip (for pagination)
|
92
83
|
limit: Maximum number of records to return
|
93
84
|
"""
|
94
|
-
response = self.client.get(
|
95
|
-
f"{self.base_url}/publish/sellers",
|
96
|
-
params={"skip": skip, "limit": limit}
|
97
|
-
)
|
85
|
+
response = self.client.get(f"{self.base_url}/publish/sellers", params={"skip": skip, "limit": limit})
|
98
86
|
response.raise_for_status()
|
99
87
|
result = response.json()
|
100
88
|
return result.get("data", result) if isinstance(result, dict) else result
|
@@ -590,7 +578,7 @@ def query_listings(
|
|
590
578
|
|
591
579
|
# Show all available fields
|
592
580
|
unitysvc_services query listings --fields \\
|
593
|
-
id,service_name,service_type,seller_name,listing_type,status,provider_name
|
581
|
+
id,name,service_name,service_type,seller_name,listing_type,status,provider_name
|
594
582
|
"""
|
595
583
|
# Parse fields list
|
596
584
|
field_list = [f.strip() for f in fields.split(",")]
|
@@ -598,6 +586,7 @@ def query_listings(
|
|
598
586
|
# Define allowed fields from ServiceListingPublic model
|
599
587
|
allowed_fields = {
|
600
588
|
"id",
|
589
|
+
"name",
|
601
590
|
"offering_id",
|
602
591
|
"offering_status",
|
603
592
|
"seller_id",
|
@@ -3,22 +3,22 @@ unitysvc_services/cli.py,sha256=OK0IZyAckxP15jRWU_W49hl3t7XcNRtd8BoDMyRKqNM,682
|
|
3
3
|
unitysvc_services/format_data.py,sha256=Jl9Vj3fRX852fHSUa5DzO-oiFQwuQHC3WMCDNIlo1Lc,5460
|
4
4
|
unitysvc_services/list.py,sha256=QDp9BByaoeFeJxXJN9RQ-jU99mH9Guq9ampfXCbpZmI,7033
|
5
5
|
unitysvc_services/populate.py,sha256=zkcjIy8BWuQSO7JwiRNHKgGoxQvc3ujluUQdYixdBvY,6626
|
6
|
-
unitysvc_services/publisher.py,sha256=
|
6
|
+
unitysvc_services/publisher.py,sha256=s3px0i1ov6FisnnYG-gkkMHwJhnGbf-Ug225vosfxxM,35733
|
7
7
|
unitysvc_services/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
unitysvc_services/query.py,sha256=
|
8
|
+
unitysvc_services/query.py,sha256=Fz7ZXm_TOf2BVZsTUKGp61OArAjhChpdJsBUFDGaOrA,24113
|
9
9
|
unitysvc_services/scaffold.py,sha256=Y73IX8vskImxSvxDgR0mvEFuAMYnBKfttn3bjcz3jmQ,40331
|
10
10
|
unitysvc_services/update.py,sha256=K9swocTUnqqiSgARo6GmuzTzUySSpyqqPPW4xF7ZU-g,9659
|
11
11
|
unitysvc_services/utils.py,sha256=GN0gkVTU8fOx2G0EbqnWmx8w9eFsoPfRprPjwCyPYkE,11371
|
12
12
|
unitysvc_services/validator.py,sha256=zuFA44ezKlfUTtdJ8M2Xd7nk1Eot4HxbBksEUaIIpZs,26790
|
13
13
|
unitysvc_services/models/__init__.py,sha256=hJCc2KSZmIHlKWKE6GpLGdeVB6LIpyVUKiOKnwmKvCs,200
|
14
14
|
unitysvc_services/models/base.py,sha256=gm3xlcC35QNRST5ikJPhdk-dTTXoY9D_5Jxkyt8SBCU,13173
|
15
|
-
unitysvc_services/models/listing_v1.py,sha256=
|
15
|
+
unitysvc_services/models/listing_v1.py,sha256=FJWRMdouz3NgiNI6E4uBxG1V_Cbb249NpKyKgvAwtRM,2450
|
16
16
|
unitysvc_services/models/provider_v1.py,sha256=cYK5kDDmzQEnLvUC2C8dKz-ZXci7hVn3fjNrJkaSr10,2050
|
17
17
|
unitysvc_services/models/seller_v1.py,sha256=SU4rqYAh9hE4EeUrEkqaVrLwusenV7MotPF77VcsRKo,3263
|
18
18
|
unitysvc_services/models/service_v1.py,sha256=u16zqM3khrJoTw_v0d45tMcKXjko5k_v3w8xwUtZ6nM,2720
|
19
|
-
unitysvc_services-0.2.
|
20
|
-
unitysvc_services-0.2.
|
21
|
-
unitysvc_services-0.2.
|
22
|
-
unitysvc_services-0.2.
|
23
|
-
unitysvc_services-0.2.
|
24
|
-
unitysvc_services-0.2.
|
19
|
+
unitysvc_services-0.2.6.dist-info/licenses/LICENSE,sha256=_p8V6A8OMPu2HIztn3O01v0-urZFwk0Dd3Yk_PTIlL8,1065
|
20
|
+
unitysvc_services-0.2.6.dist-info/METADATA,sha256=AjeLF0eSLtzkflQsrL3GP99DdZ853cfsZfWksap6AWw,6628
|
21
|
+
unitysvc_services-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
22
|
+
unitysvc_services-0.2.6.dist-info/entry_points.txt,sha256=-vodnbPmo7QQmFu8jdG6sCyGRVM727w9Nhwp4Vwau_k,64
|
23
|
+
unitysvc_services-0.2.6.dist-info/top_level.txt,sha256=GIotQj-Ro2ruR7eupM1r58PWqIHTAq647ORL7E2kneo,18
|
24
|
+
unitysvc_services-0.2.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|