spin-sdk 3.2.0__tar.gz → 3.2.1__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.
- {spin_sdk-3.2.0/src/spin_sdk.egg-info → spin_sdk-3.2.1}/PKG-INFO +2 -2
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/README.md +1 -1
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/pyproject.toml +1 -1
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/http/__init__.py +18 -7
- {spin_sdk-3.2.0 → spin_sdk-3.2.1/src/spin_sdk.egg-info}/PKG-INFO +2 -2
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/LICENSE +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/MANIFEST.in +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/setup.cfg +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/__init__.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/componentize-py.toml +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/http/poll_loop.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/key_value.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/llm.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/mqtt.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/mysql.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/postgres.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/py.typed +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/redis.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/sqlite.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/variables.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/__init__.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/command.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/environment.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/exit.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/imports.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/run.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/stdio.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/cli/terminal.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/clocks/monotonic-clock.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/clocks/wall-clock.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/clocks/world.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/filesystem/preopens.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/filesystem/types.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/filesystem/world.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/http/handler.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/http/proxy.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/http/types.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/io/error.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/io/poll.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/io/streams.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/io/world.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/random/insecure-seed.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/random/insecure.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/random/random.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/random/world.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/instance-network.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/ip-name-lookup.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/network.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/tcp-create-socket.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/tcp.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/udp-create-socket.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/udp.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/sockets/world.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/spin@unversioned/inbound-redis.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/deps/spin@unversioned/redis-types.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/exports/__init__.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/exports/inbound_redis.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/exports/incoming_handler.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/__init__.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/error.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/key_value.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/llm.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/monotonic_clock.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/mqtt.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/mysql.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/outgoing_handler.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/poll.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/postgres.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/rdbms_types.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/redis.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/redis_types.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/sqlite.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/streams.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/types.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/imports/variables.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/key-value.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/llm.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/mqtt.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/mysql.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/postgres.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/rdbms-types.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/redis.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/spin.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/sqlite.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/types.py +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk/wit/variables.wit +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk.egg-info/SOURCES.txt +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk.egg-info/dependency_links.txt +0 -0
- {spin_sdk-3.2.0 → spin_sdk-3.2.1}/src/spin_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: spin-sdk
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: Experimental SDK for Spin and Componentize-Py
|
|
5
5
|
Author-email: Fermyon Engineering <engineering@fermyon.com>
|
|
6
6
|
Maintainer-email: Fermyon Engineering <engineering@fermyon.com>
|
|
@@ -254,7 +254,7 @@ enter a virtual environment and then install the desired packages
|
|
|
254
254
|
```shell
|
|
255
255
|
python -m venv .venv
|
|
256
256
|
source .venv/bin/activate
|
|
257
|
-
pip install componentize-py==0.13.3 spin-sdk==3.1
|
|
257
|
+
pip install componentize-py==0.13.3 spin-sdk==3.2.1 mypy==1.8.0
|
|
258
258
|
```
|
|
259
259
|
|
|
260
260
|
### Hello, World
|
|
@@ -24,7 +24,7 @@ enter a virtual environment and then install the desired packages
|
|
|
24
24
|
```shell
|
|
25
25
|
python -m venv .venv
|
|
26
26
|
source .venv/bin/activate
|
|
27
|
-
pip install componentize-py==0.13.3 spin-sdk==3.1
|
|
27
|
+
pip install componentize-py==0.13.3 spin-sdk==3.2.1 mypy==1.8.0
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
### Hello, World
|
|
@@ -155,12 +155,14 @@ async def send_async(request: Request) -> Response:
|
|
|
155
155
|
url_parsed = parse.urlparse(request.uri)
|
|
156
156
|
|
|
157
157
|
match url_parsed.scheme:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
case "http":
|
|
159
|
+
scheme: Scheme = Scheme_Http()
|
|
160
|
+
case "https":
|
|
161
|
+
scheme = Scheme_Https()
|
|
162
|
+
case "":
|
|
163
|
+
scheme = Scheme_Http()
|
|
164
|
+
case _:
|
|
165
|
+
scheme = Scheme_Other(url_parsed.scheme)
|
|
164
166
|
|
|
165
167
|
if request.headers.get('content-length') is None:
|
|
166
168
|
content_length = len(request.body) if request.body is not None else 0
|
|
@@ -174,7 +176,16 @@ async def send_async(request: Request) -> Response:
|
|
|
174
176
|
outgoing_request = OutgoingRequest(Fields.from_list(headers))
|
|
175
177
|
outgoing_request.set_method(method)
|
|
176
178
|
outgoing_request.set_scheme(scheme)
|
|
177
|
-
|
|
179
|
+
if url_parsed.netloc == '':
|
|
180
|
+
if scheme == "http":
|
|
181
|
+
authority = ":80"
|
|
182
|
+
else:
|
|
183
|
+
authority = ":443"
|
|
184
|
+
else:
|
|
185
|
+
authority = url_parsed.netloc
|
|
186
|
+
|
|
187
|
+
outgoing_request.set_authority(authority)
|
|
188
|
+
|
|
178
189
|
path_and_query = url_parsed.path
|
|
179
190
|
if url_parsed.query:
|
|
180
191
|
path_and_query += '?' + url_parsed.query
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: spin-sdk
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: Experimental SDK for Spin and Componentize-Py
|
|
5
5
|
Author-email: Fermyon Engineering <engineering@fermyon.com>
|
|
6
6
|
Maintainer-email: Fermyon Engineering <engineering@fermyon.com>
|
|
@@ -254,7 +254,7 @@ enter a virtual environment and then install the desired packages
|
|
|
254
254
|
```shell
|
|
255
255
|
python -m venv .venv
|
|
256
256
|
source .venv/bin/activate
|
|
257
|
-
pip install componentize-py==0.13.3 spin-sdk==3.1
|
|
257
|
+
pip install componentize-py==0.13.3 spin-sdk==3.2.1 mypy==1.8.0
|
|
258
258
|
```
|
|
259
259
|
|
|
260
260
|
### Hello, World
|
|
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
|