without-web 0.0.2__tar.gz → 0.0.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: without-web
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: An opinionated HTTP/WebSocket router for without-asgi: trie matching, typed path params, 405-vs-404, mounting, and OpenAPI.
5
5
  Author: Josh Karpel
6
6
  Author-email: Josh Karpel <josh.karpel@gmail.com>
@@ -16,8 +16,8 @@ Classifier: Topic :: Internet :: WWW/HTTP
16
16
  Classifier: Topic :: Software Development :: Libraries
17
17
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
18
18
  Classifier: Typing :: Typed
19
- Requires-Dist: without-core==0.0.2
20
- Requires-Dist: without-asgi==0.0.2
19
+ Requires-Dist: without-core==0.0.3
20
+ Requires-Dist: without-asgi==0.0.3
21
21
  Requires-Python: >=3.14
22
22
  Description-Content-Type: text/markdown
23
23
 
@@ -40,13 +40,15 @@ import json
40
40
  from without_asgi import Response, make_asgi_app
41
41
  from without_web import INT, Router, get, path_param
42
42
 
43
- uid = path_param("id", INT) # one token: a pattern segment AND a typed read
43
+ uid = path_param("id", INT) # one token: a pattern segment AND a typed read
44
44
 
45
- @get(t"/users/{uid}", uid) # t-string pattern; `@get` returns a Route value
46
- async def show_user(state, user_id: int): # user_id is an int, no `assert isinstance`
45
+
46
+ @get(t"/users/{uid}", uid) # t-string pattern; `@get` returns a Route value
47
+ async def show_user(state, user_id: int): # user_id is an int, no `assert isinstance`
47
48
  body = json.dumps({"id": user_id}).encode()
48
49
  return Response(status=200, headers=((b"content-type", b"application/json"),), body=body)
49
50
 
51
+
50
52
  router = Router(routes=(show_user,), fallback=not_found)
51
53
  app = make_asgi_app(lifespan, http=router.dispatch)
52
54
  ```
@@ -17,13 +17,15 @@ import json
17
17
  from without_asgi import Response, make_asgi_app
18
18
  from without_web import INT, Router, get, path_param
19
19
 
20
- uid = path_param("id", INT) # one token: a pattern segment AND a typed read
20
+ uid = path_param("id", INT) # one token: a pattern segment AND a typed read
21
21
 
22
- @get(t"/users/{uid}", uid) # t-string pattern; `@get` returns a Route value
23
- async def show_user(state, user_id: int): # user_id is an int, no `assert isinstance`
22
+
23
+ @get(t"/users/{uid}", uid) # t-string pattern; `@get` returns a Route value
24
+ async def show_user(state, user_id: int): # user_id is an int, no `assert isinstance`
24
25
  body = json.dumps({"id": user_id}).encode()
25
26
  return Response(status=200, headers=((b"content-type", b"application/json"),), body=body)
26
27
 
28
+
27
29
  router = Router(routes=(show_user,), fallback=not_found)
28
30
  app = make_asgi_app(lifespan, http=router.dispatch)
29
31
  ```
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "without-web"
7
- version = "0.0.2"
7
+ version = "0.0.3"
8
8
  description = "An opinionated HTTP/WebSocket router for without-asgi: trie matching, typed path params, 405-vs-404, mounting, and OpenAPI."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -23,8 +23,8 @@ classifiers = [
23
23
  "Typing :: Typed",
24
24
  ]
25
25
  dependencies = [
26
- "without-core==0.0.2",
27
- "without-asgi==0.0.2",
26
+ "without-core==0.0.3",
27
+ "without-asgi==0.0.3",
28
28
  ]
29
29
 
30
30
  [[project.authors]]
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "without-web"
7
- version = "0.0.2"
7
+ version = "0.0.3"
8
8
  description = "An opinionated HTTP/WebSocket router for without-asgi: trie matching, typed path params, 405-vs-404, mounting, and OpenAPI."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -26,8 +26,8 @@ classifiers = [
26
26
  "Typing :: Typed",
27
27
  ]
28
28
  dependencies = [
29
- "without-core==0.0.2",
30
- "without-asgi==0.0.2",
29
+ "without-core==0.0.3",
30
+ "without-asgi==0.0.3",
31
31
  ]
32
32
 
33
33
  [tool.uv.sources]