requestmodel 0.7.0__tar.gz → 0.8.0__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.
- {requestmodel-0.7.0 → requestmodel-0.8.0}/PKG-INFO +8 -6
- {requestmodel-0.7.0 → requestmodel-0.8.0}/pyproject.toml +2 -3
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/__init__.py +0 -1
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/fastapi.py +0 -1
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/model.py +1 -1
- requestmodel-0.8.0/src/requestmodel/params.py +35 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/typing.py +0 -1
- requestmodel-0.7.0/src/requestmodel/params.py +0 -37
- {requestmodel-0.7.0 → requestmodel-0.8.0}/LICENSE +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/README.md +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/adapters/__init__.py +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/adapters/base.py +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/adapters/httpx.py +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/adapters/requests.py +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/py.typed +0 -0
- {requestmodel-0.7.0 → requestmodel-0.8.0}/src/requestmodel/utils.py +0 -0
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: requestmodel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: requestmodel
|
|
5
|
-
Home-page: https://github.com/foarsitter/requestmodel
|
|
6
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
7
|
Author: Jelmer Draaijer
|
|
8
8
|
Author-email: info@jelmert.nl
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
19
|
Requires-Dist: httpx
|
|
19
20
|
Requires-Dist: pydantic (>=2.0.0,<3.0.0)
|
|
20
21
|
Project-URL: Changelog, https://github.com/foarsitter/requestmodel/releases
|
|
21
22
|
Project-URL: Documentation, https://requestmodel.readthedocs.io
|
|
23
|
+
Project-URL: Homepage, https://github.com/foarsitter/requestmodel
|
|
22
24
|
Project-URL: Repository, https://github.com/foarsitter/requestmodel
|
|
23
25
|
Description-Content-Type: text/markdown
|
|
24
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "requestmodel"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "requestmodel"
|
|
5
5
|
authors = ["Jelmer Draaijer <info@jelmert.nl>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
Changelog = "https://github.com/foarsitter/requestmodel/releases"
|
|
17
17
|
|
|
18
18
|
[tool.poetry.dependencies]
|
|
19
|
-
python = ">=3.
|
|
19
|
+
python = ">=3.10"
|
|
20
20
|
httpx = "*"
|
|
21
21
|
pydantic = "^2.0.0"
|
|
22
22
|
|
|
@@ -69,7 +69,6 @@ fail_under = 100
|
|
|
69
69
|
[tool.isort]
|
|
70
70
|
profile = "black"
|
|
71
71
|
force_single_line = true
|
|
72
|
-
lines_after_imports = 2
|
|
73
72
|
|
|
74
73
|
[tool.mypy]
|
|
75
74
|
plugins = [
|
|
@@ -40,7 +40,7 @@ class BaseRequestModel(BaseModel, Generic[ResponseType]):
|
|
|
40
40
|
url: ClassVar[str]
|
|
41
41
|
method: ClassVar[str]
|
|
42
42
|
|
|
43
|
-
response_model: ClassVar[Type[ResponseType]]
|
|
43
|
+
response_model: ClassVar[Type[ResponseType]]
|
|
44
44
|
|
|
45
45
|
def get_path_param_names(self) -> Set[str]:
|
|
46
46
|
return get_path_param_names(self.url)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from pydantic.fields import FieldInfo
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Param(FieldInfo): # type: ignore[misc]
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Body(Param): # type: ignore[misc]
|
|
11
|
+
def __init__(self, embed: bool = False, **kwargs: Any) -> None:
|
|
12
|
+
super().__init__(**kwargs)
|
|
13
|
+
self.embed = embed
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Cookie(Param): # type: ignore[misc]
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class File(Param): # type: ignore[misc]
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Header(Param): # type: ignore[misc]
|
|
25
|
+
def __init__(self, convert_underscores: bool = True, **kwargs: Any) -> None:
|
|
26
|
+
super().__init__(**kwargs)
|
|
27
|
+
self.convert_underscores = convert_underscores
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Path(Param): # type: ignore[misc]
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Query(Param): # type: ignore[misc]
|
|
35
|
+
pass
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from pydantic.fields import FieldInfo
|
|
2
|
-
from pydantic.fields import _FieldInfoInputs
|
|
3
|
-
from typing_extensions import Unpack
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Param(FieldInfo):
|
|
7
|
-
pass
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Body(Param):
|
|
11
|
-
def __init__(self, embed: bool = False, **kwargs: Unpack[_FieldInfoInputs]) -> None:
|
|
12
|
-
super().__init__(**kwargs)
|
|
13
|
-
self.embed = embed
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class Cookie(Param):
|
|
17
|
-
pass
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class File(Param):
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Header(Param):
|
|
25
|
-
def __init__(
|
|
26
|
-
self, convert_underscores: bool = True, **kwargs: Unpack[_FieldInfoInputs]
|
|
27
|
-
) -> None:
|
|
28
|
-
super().__init__(**kwargs)
|
|
29
|
-
self.convert_underscores = convert_underscores
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class Path(Param):
|
|
33
|
-
pass
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class Query(Param):
|
|
37
|
-
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|