unitysvc-data 0.1.8__tar.gz → 0.1.10__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_data-0.1.8/src/unitysvc_data.egg-info → unitysvc_data-0.1.10}/PKG-INFO +1 -1
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/pyproject.toml +1 -1
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/_manifest.json +83 -5
- unitysvc_data-0.1.10/src/unitysvc_data/examples/api/code-example-requests/README.md +39 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/api/code-example-requests/code-example-v1.py.j2 +15 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/api/code-example-shell/README.md +38 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/api/code-example-shell/code-example-v1.sh.j2 +11 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/api/connectivity/README.md +1 -1
- unitysvc_data-0.1.10/src/unitysvc_data/examples/llm/connectivity/README.md +46 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/llm/connectivity/connectivity-v1.sh.j2 +15 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/llm/connectivity-anthropic/README.md +57 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/llm/connectivity-anthropic/connectivity-v1.sh.j2 +16 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/request-template/README.md +1 -1
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/connectivity/README.md +1 -1
- unitysvc_data-0.1.10/src/unitysvc_data/examples/smtp/code-example/README.md +64 -0
- unitysvc_data-0.1.10/src/unitysvc_data/examples/smtp/code-example/code-example-v1.py.j2 +46 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/smtp/connectivity/README.md +1 -1
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10/src/unitysvc_data.egg-info}/PKG-INFO +1 -1
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/SOURCES.txt +10 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/LICENSE +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/setup.cfg +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/__init__.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/_registry.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/_version.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/cli.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/api/connectivity/connectivity-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-anthropic/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-anthropic/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-javascript/code-example-embed-image-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-requests/code-example-embed-image-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-image-shell/code-example-embed-image-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-javascript/code-example-embed-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-requests/code-example-embed-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-embed-shell/code-example-embed-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-fc-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-fc-requests/code-example-fc-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-javascript/code-example-guard-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-requests/code-example-guard-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-guard-shell/code-example-guard-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-javascript/code-example-image-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-requests/code-example-image-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-image-shell/code-example-image-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-javascript/code-example-imagetoimage-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-requests/code-example-imagetoimage-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-imagetoimage-shell/code-example-imagetoimage-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-openai/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-openai/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-openai-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-openai-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-requests/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-javascript/code-example-rerank-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-requests/code-example-rerank-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-rerank-shell/code-example-rerank-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-javascript/code-example-sentencetransformers-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-requests/code-example-sentencetransformers-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-sentencetransformers-shell/code-example-sentencetransformers-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-shell/code-example-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-streaming-openai/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-streaming-openai/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-javascript/code-example-transcription-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-requests/code-example-transcription-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-transcription-shell/code-example-transcription-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-javascript/code-example-tts-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-requests/code-example-tts-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-tts-shell/code-example-tts-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-javascript/code-example-ttv-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-requests/code-example-ttv-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-ttv-shell/code-example-ttv-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-javascript/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-javascript/code-example-vision-v1.js.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-requests/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-requests/code-example-vision-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-shell/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/code-example-vision-shell/code-example-vision-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/description/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/description/description-v1.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/request-template/request-template-v1.json +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/notification/description/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/notification/description/description-v1.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/recommender/description/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/recommender/description/description-v1.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/code-example/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/code-example/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/connectivity/connectivity-v1.py.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/description/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/description/description-v1.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v2.sh.j2 +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/uptime/description/README.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/uptime/description/description-v1.md +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/presets.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/py.typed +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/dependency_links.txt +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/entry_points.txt +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/requires.txt +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/top_level.txt +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/tests/test_build.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/tests/test_cli.py +0 -0
- {unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/tests/test_presets.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "unitysvc-data"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.10"
|
|
8
8
|
description = "Standard examples and presets for UnitySVC data packages"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aliases": {
|
|
3
|
+
"api_code_example_requests": "api_code_example_requests_v1",
|
|
4
|
+
"api_code_example_shell": "api_code_example_shell_v1",
|
|
3
5
|
"api_connectivity": "api_connectivity_v1",
|
|
4
6
|
"llm_code_example_anthropic": "llm_code_example_anthropic_v1",
|
|
5
7
|
"llm_code_example_embed_image_javascript": "llm_code_example_embed_image_javascript_v1",
|
|
@@ -43,6 +45,8 @@
|
|
|
43
45
|
"llm_code_example_vision_javascript": "llm_code_example_vision_javascript_v1",
|
|
44
46
|
"llm_code_example_vision_requests": "llm_code_example_vision_requests_v1",
|
|
45
47
|
"llm_code_example_vision_shell": "llm_code_example_vision_shell_v1",
|
|
48
|
+
"llm_connectivity": "llm_connectivity_v1",
|
|
49
|
+
"llm_connectivity_anthropic": "llm_connectivity_anthropic_v1",
|
|
46
50
|
"llm_description": "llm_description_v1",
|
|
47
51
|
"llm_request_template": "llm_request_template_v1",
|
|
48
52
|
"notification_description": "notification_description_v1",
|
|
@@ -50,16 +54,48 @@
|
|
|
50
54
|
"s3_code_example": "s3_code_example_v1",
|
|
51
55
|
"s3_connectivity": "s3_connectivity_v1",
|
|
52
56
|
"s3_description": "s3_description_v1",
|
|
57
|
+
"smtp_code_example": "smtp_code_example_v1",
|
|
53
58
|
"smtp_connectivity": "smtp_connectivity_v2",
|
|
54
59
|
"uptime_description": "uptime_description_v1"
|
|
55
60
|
},
|
|
56
61
|
"presets": {
|
|
62
|
+
"api_code_example_requests_v1": {
|
|
63
|
+
"category": "code_example",
|
|
64
|
+
"description": "Python example: GET an HTTP endpoint via the requests library and assert a 2xx response",
|
|
65
|
+
"example_file": "api/code-example-requests/code-example-v1.py.j2",
|
|
66
|
+
"is_active": true,
|
|
67
|
+
"is_public": true,
|
|
68
|
+
"meta": {
|
|
69
|
+
"output_contains": "ok",
|
|
70
|
+
"requirements": [
|
|
71
|
+
"requests"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"mime_type": "python",
|
|
75
|
+
"preset_name": "api_code_example_requests",
|
|
76
|
+
"source_readme": "api/code-example-requests/README.md",
|
|
77
|
+
"version": 1
|
|
78
|
+
},
|
|
79
|
+
"api_code_example_shell_v1": {
|
|
80
|
+
"category": "code_example",
|
|
81
|
+
"description": "curl example: GET an HTTP endpoint and assert a 2xx response",
|
|
82
|
+
"example_file": "api/code-example-shell/code-example-v1.sh.j2",
|
|
83
|
+
"is_active": true,
|
|
84
|
+
"is_public": true,
|
|
85
|
+
"meta": {
|
|
86
|
+
"output_contains": "ok"
|
|
87
|
+
},
|
|
88
|
+
"mime_type": "bash",
|
|
89
|
+
"preset_name": "api_code_example_shell",
|
|
90
|
+
"source_readme": "api/code-example-shell/README.md",
|
|
91
|
+
"version": 1
|
|
92
|
+
},
|
|
57
93
|
"api_connectivity_v1": {
|
|
58
94
|
"category": "connectivity_test",
|
|
59
95
|
"description": "Verify HTTP endpoint is reachable and returns a healthy status",
|
|
60
96
|
"example_file": "api/connectivity/connectivity-v1.sh.j2",
|
|
61
97
|
"is_active": true,
|
|
62
|
-
"is_public":
|
|
98
|
+
"is_public": true,
|
|
63
99
|
"meta": {
|
|
64
100
|
"output_contains": "connectivity ok"
|
|
65
101
|
},
|
|
@@ -644,6 +680,34 @@
|
|
|
644
680
|
"source_readme": "llm/code-example-vision-shell/README.md",
|
|
645
681
|
"version": 1
|
|
646
682
|
},
|
|
683
|
+
"llm_connectivity_anthropic_v1": {
|
|
684
|
+
"category": "connectivity_test",
|
|
685
|
+
"description": "Verify an Anthropic-Messages-API LLM endpoint by issuing a tiny one-token message",
|
|
686
|
+
"example_file": "llm/connectivity-anthropic/connectivity-v1.sh.j2",
|
|
687
|
+
"is_active": true,
|
|
688
|
+
"is_public": false,
|
|
689
|
+
"meta": {
|
|
690
|
+
"output_contains": "connectivity ok"
|
|
691
|
+
},
|
|
692
|
+
"mime_type": "bash",
|
|
693
|
+
"preset_name": "llm_connectivity_anthropic",
|
|
694
|
+
"source_readme": "llm/connectivity-anthropic/README.md",
|
|
695
|
+
"version": 1
|
|
696
|
+
},
|
|
697
|
+
"llm_connectivity_v1": {
|
|
698
|
+
"category": "connectivity_test",
|
|
699
|
+
"description": "Verify an OpenAI-compatible LLM endpoint by issuing a tiny chat completion",
|
|
700
|
+
"example_file": "llm/connectivity/connectivity-v1.sh.j2",
|
|
701
|
+
"is_active": true,
|
|
702
|
+
"is_public": false,
|
|
703
|
+
"meta": {
|
|
704
|
+
"output_contains": "connectivity ok"
|
|
705
|
+
},
|
|
706
|
+
"mime_type": "bash",
|
|
707
|
+
"preset_name": "llm_connectivity",
|
|
708
|
+
"source_readme": "llm/connectivity/README.md",
|
|
709
|
+
"version": 1
|
|
710
|
+
},
|
|
647
711
|
"llm_description_v1": {
|
|
648
712
|
"category": "getting_started",
|
|
649
713
|
"description": "Customer-facing overview of an OpenAI-compatible LLM gateway service",
|
|
@@ -661,7 +725,7 @@
|
|
|
661
725
|
"description": "Minimal OpenAI-compatible chat completion request body",
|
|
662
726
|
"example_file": "llm/request-template/request-template-v1.json",
|
|
663
727
|
"is_active": true,
|
|
664
|
-
"is_public":
|
|
728
|
+
"is_public": true,
|
|
665
729
|
"meta": {},
|
|
666
730
|
"mime_type": "json",
|
|
667
731
|
"preset_name": "llm_request_template",
|
|
@@ -714,7 +778,7 @@
|
|
|
714
778
|
"description": "Verify S3 endpoint accepts the configured credentials",
|
|
715
779
|
"example_file": "s3/connectivity/connectivity-v1.py.j2",
|
|
716
780
|
"is_active": true,
|
|
717
|
-
"is_public":
|
|
781
|
+
"is_public": true,
|
|
718
782
|
"meta": {
|
|
719
783
|
"output_contains": "connectivity ok",
|
|
720
784
|
"requirements": [
|
|
@@ -738,12 +802,26 @@
|
|
|
738
802
|
"source_readme": "s3/description/README.md",
|
|
739
803
|
"version": 1
|
|
740
804
|
},
|
|
805
|
+
"smtp_code_example_v1": {
|
|
806
|
+
"category": "code_example",
|
|
807
|
+
"description": "Python example: send a test email via the UnitySVC SMTP gateway",
|
|
808
|
+
"example_file": "smtp/code-example/code-example-v1.py.j2",
|
|
809
|
+
"is_active": true,
|
|
810
|
+
"is_public": true,
|
|
811
|
+
"meta": {
|
|
812
|
+
"output_contains": "connectivity ok"
|
|
813
|
+
},
|
|
814
|
+
"mime_type": "python",
|
|
815
|
+
"preset_name": "smtp_code_example",
|
|
816
|
+
"source_readme": "smtp/code-example/README.md",
|
|
817
|
+
"version": 1
|
|
818
|
+
},
|
|
741
819
|
"smtp_connectivity_v1": {
|
|
742
820
|
"category": "connectivity_test",
|
|
743
821
|
"description": "Verify SMTP server returns a 220 greeting on connect",
|
|
744
822
|
"example_file": "smtp/connectivity/connectivity-v1.sh.j2",
|
|
745
823
|
"is_active": true,
|
|
746
|
-
"is_public":
|
|
824
|
+
"is_public": true,
|
|
747
825
|
"meta": {
|
|
748
826
|
"output_contains": "connectivity ok"
|
|
749
827
|
},
|
|
@@ -757,7 +835,7 @@
|
|
|
757
835
|
"description": "Verify SMTP server returns a 220 greeting on connect",
|
|
758
836
|
"example_file": "smtp/connectivity/connectivity-v2.sh.j2",
|
|
759
837
|
"is_active": true,
|
|
760
|
-
"is_public":
|
|
838
|
+
"is_public": true,
|
|
761
839
|
"meta": {
|
|
762
840
|
"output_contains": "connectivity ok"
|
|
763
841
|
},
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "api_code_example_requests"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "python"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
|
+
description = "Python example: GET an HTTP endpoint via the requests library and assert a 2xx response"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
meta = { requirements = ["requests"], output_contains = "ok" }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# api / code-example-requests — generic HTTP smoke test via `requests`
|
|
13
|
+
|
|
14
|
+
Customer-facing Python example for any HTTP-based service that's
|
|
15
|
+
fronted by a UnitySVC gateway (HTTP relays, S3-compatible proxies,
|
|
16
|
+
echo services, simple forward services). Sends a `GET` to
|
|
17
|
+
`{{ service_base_url }}` using the `requests` library and asserts
|
|
18
|
+
the response is 2xx.
|
|
19
|
+
|
|
20
|
+
Companion to `api_connectivity` (curl smoke test, internal) — same
|
|
21
|
+
endpoint check, different audience: this one is the doc you'd hand
|
|
22
|
+
a customer who wants to wire the service into their own Python code.
|
|
23
|
+
|
|
24
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
25
|
+
|
|
26
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
27
|
+
|
|
28
|
+
## Environment variables (read at runtime)
|
|
29
|
+
|
|
30
|
+
- `UNITYSVC_API_KEY` — optional. Sent as `Authorization: Bearer …` when set.
|
|
31
|
+
|
|
32
|
+
## Versions
|
|
33
|
+
|
|
34
|
+
### v1 — initial release
|
|
35
|
+
|
|
36
|
+
- `GET {{ service_base_url }}` with optional bearer auth, 5-second timeout.
|
|
37
|
+
- `raise_for_status()` raises on any non-2xx response (exit code ≠ 0).
|
|
38
|
+
- Prints `ok` on success — paired with the `output_contains = "ok"` meta
|
|
39
|
+
so the platform's run-tests flow can confirm a real endpoint hit.
|
unitysvc_data-0.1.10/src/unitysvc_data/examples/api/code-example-requests/code-example-v1.py.j2
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Generic HTTP smoke test for any UnitySVC HTTP-fronted service.
|
|
2
|
+
|
|
3
|
+
Sends a GET to the rendered base URL and raises on a non-2xx response.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
|
|
8
|
+
import requests
|
|
9
|
+
|
|
10
|
+
headers = {}
|
|
11
|
+
if api_key := os.environ.get("UNITYSVC_API_KEY"):
|
|
12
|
+
headers["Authorization"] = f"Bearer {api_key}"
|
|
13
|
+
|
|
14
|
+
requests.get("{{ service_base_url }}", headers=headers, timeout=5).raise_for_status()
|
|
15
|
+
print("ok")
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "api_code_example_shell"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "bash"
|
|
5
|
+
file = "code-example.sh.j2"
|
|
6
|
+
description = "curl example: GET an HTTP endpoint and assert a 2xx response"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
meta = { output_contains = "ok" }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# api / code-example-shell — generic HTTP smoke test via `curl`
|
|
13
|
+
|
|
14
|
+
Customer-facing shell example for any HTTP-based service fronted by
|
|
15
|
+
a UnitySVC gateway. `curl`s `{{ service_base_url }}` and asserts a
|
|
16
|
+
2xx status.
|
|
17
|
+
|
|
18
|
+
Companion to `api_connectivity` (which has broader pass criteria —
|
|
19
|
+
2xx/3xx/401/403 — and is intended for internal connectivity testing).
|
|
20
|
+
This preset is stricter (2xx only) and is the doc you'd show a
|
|
21
|
+
customer wiring the service into a shell script.
|
|
22
|
+
|
|
23
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
24
|
+
|
|
25
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
26
|
+
|
|
27
|
+
## Environment variables (read at runtime)
|
|
28
|
+
|
|
29
|
+
- `UNITYSVC_API_KEY` — optional. Sent as `Authorization: Bearer …` when set.
|
|
30
|
+
|
|
31
|
+
## Versions
|
|
32
|
+
|
|
33
|
+
### v1 — initial release
|
|
34
|
+
|
|
35
|
+
- `curl -fsS {{ service_base_url }}` with optional bearer auth, 5-second timeout.
|
|
36
|
+
- `-f` makes curl exit non-zero on any non-2xx response.
|
|
37
|
+
- Prints `ok` on success — paired with the `output_contains = "ok"` meta
|
|
38
|
+
so the platform's run-tests flow can confirm a real endpoint hit.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Generic HTTP smoke test for any UnitySVC HTTP-fronted service.
|
|
3
|
+
# `-f` makes curl exit non-zero on any non-2xx response.
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
if [ -n "${UNITYSVC_API_KEY:-}" ]; then
|
|
7
|
+
curl -fsS --max-time 5 -H "Authorization: Bearer ${UNITYSVC_API_KEY}" -o /dev/null "{{ service_base_url }}"
|
|
8
|
+
else
|
|
9
|
+
curl -fsS --max-time 5 -o /dev/null "{{ service_base_url }}"
|
|
10
|
+
fi
|
|
11
|
+
echo "ok"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "llm_connectivity"
|
|
3
|
+
category = "connectivity_test"
|
|
4
|
+
mime_type = "bash"
|
|
5
|
+
file = "connectivity.sh.j2"
|
|
6
|
+
description = "Verify an OpenAI-compatible LLM endpoint by issuing a tiny chat completion"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = false
|
|
9
|
+
meta = { output_contains = "connectivity ok" }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# llm / connectivity — chat completion smoke test
|
|
13
|
+
|
|
14
|
+
Connectivity check for OpenAI-compatible LLM services routed through
|
|
15
|
+
the UnitySVC LLM gateway. Posts a one-token chat completion against
|
|
16
|
+
`{{ routing_key.model }}`, asserts the gateway returned a real
|
|
17
|
+
`choices` array, and prints `connectivity ok` on success.
|
|
18
|
+
|
|
19
|
+
This is a step deeper than `api_connectivity` (which just checks the
|
|
20
|
+
URL responds). For an LLM service, "is the gateway alive?" is too
|
|
21
|
+
weak — what we actually want to know is "can this model produce a
|
|
22
|
+
completion?" The cheap one-token request answers that without
|
|
23
|
+
generating a real reply.
|
|
24
|
+
|
|
25
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
26
|
+
|
|
27
|
+
- `{{ service_base_url }}` — endpoint base URL.
|
|
28
|
+
- `{{ routing_key.model }}` — model id.
|
|
29
|
+
|
|
30
|
+
## Environment variables (read at runtime)
|
|
31
|
+
|
|
32
|
+
- `UNITYSVC_API_KEY` — required. Bearer token: customer's svcpass for
|
|
33
|
+
gateway access, or an upstream key when wired as a secret (BYOK).
|
|
34
|
+
|
|
35
|
+
## Versions
|
|
36
|
+
|
|
37
|
+
### v1 — initial release
|
|
38
|
+
|
|
39
|
+
- POST `/chat/completions` with `messages: [{role: user, content: "ping"}]` and `max_tokens: 1`.
|
|
40
|
+
- `curl --fail-with-body` so 4xx / 5xx surface as non-zero exit + body in stderr.
|
|
41
|
+
- `grep -q '"choices"'` so a 200 with an unrelated body (rare, but
|
|
42
|
+
some upstream errors return 200 with an `{"error": ...}` envelope)
|
|
43
|
+
still fails.
|
|
44
|
+
- Output contains `connectivity ok` — paired with the
|
|
45
|
+
`output_contains = "connectivity ok"` meta so the run-tests flow can
|
|
46
|
+
confirm a real round-trip.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# LLM connectivity probe: POST a one-token chat completion against the
|
|
3
|
+
# rendered model and assert the gateway returned a real ``choices``
|
|
4
|
+
# array. Cheap, non-zero exit on any 4xx / 5xx, prints "connectivity ok"
|
|
5
|
+
# on success so output_contains can verify a real round-trip.
|
|
6
|
+
set -e -o pipefail
|
|
7
|
+
|
|
8
|
+
: "${UNITYSVC_API_KEY:?UNITYSVC_API_KEY is not set}"
|
|
9
|
+
|
|
10
|
+
curl --fail-with-body -sS "{{ service_base_url }}/chat/completions" \
|
|
11
|
+
-H "Content-Type: application/json" \
|
|
12
|
+
-H "Authorization: Bearer ${UNITYSVC_API_KEY}" \
|
|
13
|
+
-d '{"model":"{{ routing_key.model }}","messages":[{"role":"user","content":"ping"}],"max_tokens":1}' \
|
|
14
|
+
| grep -q '"choices"'
|
|
15
|
+
echo "connectivity ok"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "llm_connectivity_anthropic"
|
|
3
|
+
category = "connectivity_test"
|
|
4
|
+
mime_type = "bash"
|
|
5
|
+
file = "connectivity.sh.j2"
|
|
6
|
+
description = "Verify an Anthropic-Messages-API LLM endpoint by issuing a tiny one-token message"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = false
|
|
9
|
+
meta = { output_contains = "connectivity ok" }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# llm / connectivity-anthropic — Anthropic Messages API smoke test
|
|
13
|
+
|
|
14
|
+
Connectivity check for Anthropic-Messages-API LLM services
|
|
15
|
+
(`/v1/messages`, primarily Claude-family models). Companion to
|
|
16
|
+
`llm_connectivity` (OpenAI-compatible `/chat/completions`) — Anthropic's
|
|
17
|
+
API isn't OpenAI-shaped (different endpoint, required `max_tokens`,
|
|
18
|
+
top-level `system`, `content[].text` response), so it needs its own
|
|
19
|
+
preset.
|
|
20
|
+
|
|
21
|
+
## Differences vs `llm_connectivity`
|
|
22
|
+
|
|
23
|
+
| | `llm_connectivity` | `llm_connectivity_anthropic` |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| Endpoint | `/chat/completions` | `/v1/messages` |
|
|
26
|
+
| Auth header | `Authorization: Bearer …` | `x-api-key: …` |
|
|
27
|
+
| Required header | — | `anthropic-version: 2023-06-01` |
|
|
28
|
+
| Required body fields | `model`, `messages` | `model`, `messages`, `max_tokens` |
|
|
29
|
+
| Response shape | `"choices"` | `"content"` |
|
|
30
|
+
|
|
31
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
32
|
+
|
|
33
|
+
- `{{ service_base_url }}` — endpoint base URL.
|
|
34
|
+
- `{{ routing_key.model }}` — model id.
|
|
35
|
+
|
|
36
|
+
## Environment variables (read at runtime)
|
|
37
|
+
|
|
38
|
+
- `UNITYSVC_API_KEY` — required. Sent as the `x-api-key` header.
|
|
39
|
+
Customer's svcpass for gateway access, or an upstream key when
|
|
40
|
+
wired as a secret (BYOK).
|
|
41
|
+
|
|
42
|
+
## Versions
|
|
43
|
+
|
|
44
|
+
### v1 — initial release
|
|
45
|
+
|
|
46
|
+
- POST `/v1/messages` with `messages: [{role: user, content: "ping"}]`
|
|
47
|
+
and `max_tokens: 1`.
|
|
48
|
+
- Sends `anthropic-version: 2023-06-01` (the version pinned by the
|
|
49
|
+
current Python SDK; matches what gateways and Claude apps expect).
|
|
50
|
+
- `curl --fail-with-body` so 4xx / 5xx exit non-zero with the body
|
|
51
|
+
on stderr.
|
|
52
|
+
- `grep -q '"content"'` — Anthropic returns the assistant text in a
|
|
53
|
+
`content` array, so this confirms a real response envelope rather
|
|
54
|
+
than a 200 with an unrelated body.
|
|
55
|
+
- Output contains `connectivity ok` — paired with the
|
|
56
|
+
`output_contains = "connectivity ok"` meta so the run-tests flow
|
|
57
|
+
can confirm a real round-trip.
|
unitysvc_data-0.1.10/src/unitysvc_data/examples/llm/connectivity-anthropic/connectivity-v1.sh.j2
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Anthropic Messages API connectivity probe: POST a one-token message
|
|
3
|
+
# against the rendered model and assert the gateway returned a real
|
|
4
|
+
# ``content`` array. Cheap, non-zero exit on any 4xx/5xx, prints
|
|
5
|
+
# "connectivity ok" on success.
|
|
6
|
+
set -e -o pipefail
|
|
7
|
+
|
|
8
|
+
: "${UNITYSVC_API_KEY:?UNITYSVC_API_KEY is not set}"
|
|
9
|
+
|
|
10
|
+
curl --fail-with-body -sS "{{ service_base_url }}/v1/messages" \
|
|
11
|
+
-H "Content-Type: application/json" \
|
|
12
|
+
-H "x-api-key: ${UNITYSVC_API_KEY}" \
|
|
13
|
+
-H "anthropic-version: 2023-06-01" \
|
|
14
|
+
-d '{"model":"{{ routing_key.model }}","max_tokens":1,"messages":[{"role":"user","content":"ping"}]}' \
|
|
15
|
+
| grep -q '"content"'
|
|
16
|
+
echo "connectivity ok"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "smtp_code_example"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "python"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
|
+
description = "Python example: send a test email via the UnitySVC SMTP gateway"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
meta = { output_contains = "connectivity ok" }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# smtp / code-example — send-email smoke test
|
|
13
|
+
|
|
14
|
+
Customer-facing Python example for SMTP services routed through the
|
|
15
|
+
UnitySVC gateway (BYOK relay, multi-enrollment relay, mailpit-backed
|
|
16
|
+
test gateway). Composes a one-line text email and sends it, picking
|
|
17
|
+
implicit TLS (SMTPS) vs plain-with-STARTTLS based on the rendered URL
|
|
18
|
+
or the seller's `tls` flag.
|
|
19
|
+
|
|
20
|
+
The same template covers both render modes — local-testing
|
|
21
|
+
(`local_testing == True`) inlines the seller's upstream credentials
|
|
22
|
+
for ops-test runs, gateway mode parses `service_base_url` and reads
|
|
23
|
+
the customer's API key from `UNITYSVC_API_KEY`.
|
|
24
|
+
|
|
25
|
+
## Template variables
|
|
26
|
+
|
|
27
|
+
**Local-testing mode** (`{% raw %}{% if local_testing %}{% endraw %}`) — the renderer fills these
|
|
28
|
+
from the offering's `upstream_access_config` after substituting
|
|
29
|
+
`ops_testing_parameters`:
|
|
30
|
+
|
|
31
|
+
- `{% raw %}{{ host }}{% endraw %}` — upstream SMTP host.
|
|
32
|
+
- `{% raw %}{{ port }}{% endraw %}` — upstream SMTP port. Defaults to 587 (submission).
|
|
33
|
+
- `{% raw %}{{ tls }}{% endraw %}` — `true` ⇒ implicit TLS (port 465 / SMTPS),
|
|
34
|
+
`false` ⇒ plain TCP with optional STARTTLS upgrade. Accepted as
|
|
35
|
+
Python bool, lowercase string, or capitalised string.
|
|
36
|
+
- `{% raw %}{{ username }}{% endraw %}`, `{% raw %}{{ password }}{% endraw %}` — upstream credentials. Inlining
|
|
37
|
+
these is fine because this branch is only ever rendered for the
|
|
38
|
+
seller's own ops-test flow; customers never see local-testing
|
|
39
|
+
output.
|
|
40
|
+
|
|
41
|
+
**Gateway mode** (the `else` branch) — the renderer fills these from
|
|
42
|
+
the listing's access interface:
|
|
43
|
+
|
|
44
|
+
- `{% raw %}{{ service_base_url }}{% endraw %}` — `smtp://host:port` or
|
|
45
|
+
`smtps://host:port`.
|
|
46
|
+
- `{% raw %}{{ routing_key.username }}{% endraw %}` — SMTP username (per the listing's
|
|
47
|
+
`routing_key`).
|
|
48
|
+
|
|
49
|
+
## Environment variables (read at runtime)
|
|
50
|
+
|
|
51
|
+
- `UNITYSVC_API_KEY` — gateway-mode SMTP password. Always pulled from
|
|
52
|
+
env, never inlined into rendered output (per-customer secret).
|
|
53
|
+
|
|
54
|
+
## Versions
|
|
55
|
+
|
|
56
|
+
### v1 — initial release
|
|
57
|
+
|
|
58
|
+
- Implicit TLS via `smtplib.SMTP_SSL` when `use_ssl`; otherwise plain
|
|
59
|
+
`smtplib.SMTP` with optional STARTTLS upgrade detected via
|
|
60
|
+
`server.has_extn("STARTTLS")`.
|
|
61
|
+
- 10-second connect/operation timeout.
|
|
62
|
+
- Prints `connectivity ok` on success — paired with the
|
|
63
|
+
`output_contains = "connectivity ok"` meta so the platform's
|
|
64
|
+
run-tests flow can verify a real send completed.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import smtplib
|
|
2
|
+
from email.mime.text import MIMEText
|
|
3
|
+
|
|
4
|
+
{% if local_testing %}
|
|
5
|
+
# Seller ops-testing mode. The renderer inlines upstream host/port/credentials
|
|
6
|
+
# from the offering's upstream_access_config (after substituting customer
|
|
7
|
+
# secrets from ops_testing_parameters). The seller only ever sees their own
|
|
8
|
+
# credentials, so inlining them is fine — this branch never reaches a customer.
|
|
9
|
+
smtp_host = "{{ host }}"
|
|
10
|
+
smtp_port = {{ port | default(587) }}
|
|
11
|
+
use_ssl = "{{ tls | default(false) }}".lower() == "true"
|
|
12
|
+
username = "{{ username | default('') }}"
|
|
13
|
+
password = "{{ password | default('') }}"
|
|
14
|
+
{% else %}
|
|
15
|
+
# Gateway mode (customer-facing). The base URL is rendered inline; username
|
|
16
|
+
# comes from the listing's routing_key. The API key stays as an env-var
|
|
17
|
+
# lookup — keys are never inlined into rendered output, on any code path.
|
|
18
|
+
import os
|
|
19
|
+
from urllib.parse import urlparse
|
|
20
|
+
|
|
21
|
+
parsed = urlparse("{{ service_base_url }}")
|
|
22
|
+
smtp_host = parsed.hostname
|
|
23
|
+
smtp_port = parsed.port or 587
|
|
24
|
+
use_ssl = parsed.scheme == "smtps"
|
|
25
|
+
username = "{{ routing_key.username }}"
|
|
26
|
+
password = os.environ["UNITYSVC_API_KEY"]
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
msg = MIMEText("Hello from UnitySVC SMTP Gateway!")
|
|
30
|
+
msg["Subject"] = "Test Email via SMTP Gateway"
|
|
31
|
+
msg["From"] = "test@example.com"
|
|
32
|
+
msg["To"] = "recipient@example.com"
|
|
33
|
+
|
|
34
|
+
# Implicit TLS (port 465 / smtps://) → SMTP_SSL.
|
|
35
|
+
# Plain TCP with optional STARTTLS upgrade (port 587 / smtp://) → SMTP.
|
|
36
|
+
cls = smtplib.SMTP_SSL if use_ssl else smtplib.SMTP
|
|
37
|
+
with cls(smtp_host, smtp_port, timeout=10) as server:
|
|
38
|
+
if not use_ssl:
|
|
39
|
+
server.ehlo()
|
|
40
|
+
if server.has_extn("STARTTLS"):
|
|
41
|
+
server.starttls()
|
|
42
|
+
server.ehlo()
|
|
43
|
+
if username and password:
|
|
44
|
+
server.login(username, password)
|
|
45
|
+
server.send_message(msg)
|
|
46
|
+
print("connectivity ok")
|
|
@@ -14,6 +14,10 @@ src/unitysvc_data.egg-info/dependency_links.txt
|
|
|
14
14
|
src/unitysvc_data.egg-info/entry_points.txt
|
|
15
15
|
src/unitysvc_data.egg-info/requires.txt
|
|
16
16
|
src/unitysvc_data.egg-info/top_level.txt
|
|
17
|
+
src/unitysvc_data/examples/api/code-example-requests/README.md
|
|
18
|
+
src/unitysvc_data/examples/api/code-example-requests/code-example-v1.py.j2
|
|
19
|
+
src/unitysvc_data/examples/api/code-example-shell/README.md
|
|
20
|
+
src/unitysvc_data/examples/api/code-example-shell/code-example-v1.sh.j2
|
|
17
21
|
src/unitysvc_data/examples/api/connectivity/README.md
|
|
18
22
|
src/unitysvc_data/examples/api/connectivity/connectivity-v1.sh.j2
|
|
19
23
|
src/unitysvc_data/examples/llm/code-example-anthropic/README.md
|
|
@@ -100,6 +104,10 @@ src/unitysvc_data/examples/llm/code-example-vision-requests/README.md
|
|
|
100
104
|
src/unitysvc_data/examples/llm/code-example-vision-requests/code-example-vision-v1.py.j2
|
|
101
105
|
src/unitysvc_data/examples/llm/code-example-vision-shell/README.md
|
|
102
106
|
src/unitysvc_data/examples/llm/code-example-vision-shell/code-example-vision-v1.sh.j2
|
|
107
|
+
src/unitysvc_data/examples/llm/connectivity/README.md
|
|
108
|
+
src/unitysvc_data/examples/llm/connectivity/connectivity-v1.sh.j2
|
|
109
|
+
src/unitysvc_data/examples/llm/connectivity-anthropic/README.md
|
|
110
|
+
src/unitysvc_data/examples/llm/connectivity-anthropic/connectivity-v1.sh.j2
|
|
103
111
|
src/unitysvc_data/examples/llm/description/README.md
|
|
104
112
|
src/unitysvc_data/examples/llm/description/description-v1.md
|
|
105
113
|
src/unitysvc_data/examples/llm/request-template/README.md
|
|
@@ -114,6 +122,8 @@ src/unitysvc_data/examples/s3/connectivity/README.md
|
|
|
114
122
|
src/unitysvc_data/examples/s3/connectivity/connectivity-v1.py.j2
|
|
115
123
|
src/unitysvc_data/examples/s3/description/README.md
|
|
116
124
|
src/unitysvc_data/examples/s3/description/description-v1.md
|
|
125
|
+
src/unitysvc_data/examples/smtp/code-example/README.md
|
|
126
|
+
src/unitysvc_data/examples/smtp/code-example/code-example-v1.py.j2
|
|
117
127
|
src/unitysvc_data/examples/smtp/connectivity/README.md
|
|
118
128
|
src/unitysvc_data/examples/smtp/connectivity/connectivity-v1.sh.j2
|
|
119
129
|
src/unitysvc_data/examples/smtp/connectivity/connectivity-v2.sh.j2
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/llm/description/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/code-example/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/s3/description/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data/examples/uptime/description/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unitysvc_data-0.1.8 → unitysvc_data-0.1.10}/src/unitysvc_data.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|