unitysvc-services 0.2.4__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unitysvc_services-0.2.4/src/unitysvc_services.egg-info → unitysvc_services-0.2.5}/PKG-INFO +1 -1
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/data-structure.md +10 -2
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/file-schemas.md +11 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/pyproject.toml +1 -1
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/listing_v1.py +5 -6
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/publisher.py +4 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/query.py +4 -16
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5/src/unitysvc_services.egg-info}/PKG-INFO +1 -1
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/CONTRIBUTING.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/HISTORY.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/LICENSE +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/MANIFEST.in +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/README.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/api-reference.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/cli-reference.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/contributing.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/development.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/getting-started.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/index.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/installation.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/usage.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/docs/workflows.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/setup.cfg +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/__init__.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/cli.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/format_data.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/list.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/__init__.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/base.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/provider_v1.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/seller_v1.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/service_v1.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/populate.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/py.typed +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/scaffold.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/update.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/utils.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/validator.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/SOURCES.txt +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/dependency_links.txt +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/entry_points.txt +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/requires.txt +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/top_level.txt +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/__init__.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/README.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/README.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/provider.toml +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/services/service1/code-example.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/services/service1/service.toml +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/services/service1/svcreseller.toml +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/terms-of-service.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/README.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/provider.json +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/services/service2/code-example.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/services/service2/service.json +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/services/service2/svcreseller.json +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/terms-of-service.md +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/seller.json +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/test_utils.py +0 -0
- {unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/test_validator.py +0 -0
@@ -80,6 +80,13 @@ data/
|
|
80
80
|
- Location: `${provider_name}/services/${service_name}/listing-*.json`
|
81
81
|
- Both offerings and listings are defined in the same service directory under the provider
|
82
82
|
|
83
|
+
#### Multiple Listings Per Service
|
84
|
+
When a single service offering has multiple listings (e.g., different pricing tiers, different marketplaces), the filename becomes significant:
|
85
|
+
|
86
|
+
- **Filename as identifier**: If the `name` field is not provided in the listing file, the filename (without extension) is automatically used as the listing name
|
87
|
+
- **Example**: `listing-premium.json`, `listing-basic.json`, `listing-enterprise.json` for different tiers
|
88
|
+
- **Best practice**: Use descriptive filenames that indicate the listing variant, or explicitly set the `name` field in each file
|
89
|
+
|
83
90
|
### 7. External Files (Documentation, Code Examples, etc.)
|
84
91
|
- External files like code examples, documentation, images can be placed anywhere in the directory structure
|
85
92
|
- They are referenced by **relative paths** from the referencing file
|
@@ -181,10 +188,11 @@ data/
|
|
181
188
|
│ └── services/
|
182
189
|
│ ├── gpt-4/ # Service: "gpt-4"
|
183
190
|
│ │ ├── service.json # name = "gpt-4"
|
184
|
-
│ │
|
191
|
+
│ │ ├── listing-premium.json # name = "listing-premium" (or defaults to filename)
|
192
|
+
│ │ └── listing-basic.json # name = "listing-basic" (multiple listings for one service)
|
185
193
|
│ └── gpt-3.5-turbo/ # Service: "gpt-3.5-turbo"
|
186
194
|
│ ├── service.json # name = "gpt-3.5-turbo"
|
187
|
-
│ └── listing-svcreseller.json
|
195
|
+
│ └── listing-svcreseller.json # Single listing
|
188
196
|
└── anthropic/ # Provider: "anthropic"
|
189
197
|
├── provider.json # name = "anthropic"
|
190
198
|
└── services/
|
@@ -194,6 +194,7 @@ Listing files define how a seller presents/sells a service (downstream/marketpla
|
|
194
194
|
| Field | Type | Description |
|
195
195
|
|-------|------|-------------|
|
196
196
|
| `schema` | string | Must be `"listing_v1"` |
|
197
|
+
| `name` | string | Listing identifier (defaults to filename without extension if not provided) |
|
197
198
|
| `seller_name` | string | Seller identifier (references seller file) |
|
198
199
|
| `listing_status` | string | Listing status (see Status Values) |
|
199
200
|
|
@@ -209,6 +210,15 @@ Listing files define how a seller presents/sells a service (downstream/marketpla
|
|
209
210
|
| `documents` | array | Documentation files |
|
210
211
|
| `tags` | array | Search/filter tags |
|
211
212
|
|
213
|
+
### Listing Name Field
|
214
|
+
|
215
|
+
The `name` field identifies the listing and is especially important when multiple listings exist for a single service offering:
|
216
|
+
|
217
|
+
- **Automatic naming**: If the `name` field is not provided, the SDK automatically uses the filename (without extension) as the listing name
|
218
|
+
- **Multiple listings**: When you have multiple listings for one service (e.g., different tiers or marketplaces), use descriptive filenames
|
219
|
+
- **Example**: A file named `listing-premium.json` will automatically get `name = "listing-premium"` if the field is omitted
|
220
|
+
- **Best practice**: Use explicit `name` fields for clarity, or use descriptive filenames that will serve as meaningful listing identifiers
|
221
|
+
|
212
222
|
### listing_status Values
|
213
223
|
|
214
224
|
- `unknown` - Status not yet determined
|
@@ -223,6 +233,7 @@ Listing files define how a seller presents/sells a service (downstream/marketpla
|
|
223
233
|
|
224
234
|
```toml
|
225
235
|
schema = "listing_v1"
|
236
|
+
name = "listing-premium"
|
226
237
|
seller_name = "svcreseller"
|
227
238
|
service_name = "gpt-4"
|
228
239
|
listing_status = "in_service"
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/listing_v1.py
RENAMED
@@ -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,10 @@ 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 = Field(
|
31
|
+
max_length=255,
|
32
|
+
description="Name identifier for the service listing, default to filename",
|
33
|
+
)
|
35
34
|
# unique name for each provider, usually following upstream naming convention
|
36
35
|
# status of the service, public, deprecated etc
|
37
36
|
listing_status: ListingStatusEnum = Field(
|
@@ -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)
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/__init__.py
RENAMED
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/provider_v1.py
RENAMED
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/seller_v1.py
RENAMED
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services/models/service_v1.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/entry_points.txt
RENAMED
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/requires.txt
RENAMED
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/src/unitysvc_services.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/provider.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider1/terms-of-service.md
RENAMED
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/provider.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{unitysvc_services-0.2.4 → unitysvc_services-0.2.5}/tests/example_data/provider2/terms-of-service.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|