mm-http 0.0.3__py3-none-any.whl → 0.1.1__py3-none-any.whl

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.
mm_http/response.py CHANGED
@@ -7,8 +7,6 @@ from typing import Any
7
7
 
8
8
  import pydash
9
9
  from mm_result import Result
10
- from pydantic import GetCoreSchemaHandler
11
- from pydantic_core import CoreSchema, core_schema
12
10
 
13
11
 
14
12
  @enum.unique
@@ -90,25 +88,3 @@ class HttpResponse:
90
88
  if self.headers is not None:
91
89
  parts.append(f"headers={self.headers!r}")
92
90
  return f"HttpResponse({', '.join(parts)})"
93
-
94
- @classmethod
95
- def __get_pydantic_core_schema__(cls, _source_type: type[Any], _handler: GetCoreSchemaHandler) -> CoreSchema:
96
- return core_schema.no_info_after_validator_function(
97
- cls._validate,
98
- core_schema.any_schema(),
99
- serialization=core_schema.plain_serializer_function_ser_schema(lambda x: x.to_dict()),
100
- )
101
-
102
- @classmethod
103
- def _validate(cls, value: object) -> HttpResponse:
104
- if isinstance(value, cls):
105
- return value
106
- if isinstance(value, dict):
107
- return cls(
108
- status_code=value.get("status_code"),
109
- error=HttpError(value["error"]) if value.get("error") else None,
110
- error_message=value.get("error_message"),
111
- body=value.get("body"),
112
- headers=value.get("headers"),
113
- )
114
- raise TypeError(f"Invalid value for HttpResponse: {value}")
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.4
2
+ Name: mm-http
3
+ Version: 0.1.1
4
+ Requires-Python: >=3.13
5
+ Requires-Dist: aiohttp-socks~=0.10.1
6
+ Requires-Dist: aiohttp~=3.12.13
7
+ Requires-Dist: mm-result~=0.1.1
8
+ Requires-Dist: pydash~=8.0.5
9
+ Requires-Dist: requests[socks]~=2.32.4
10
+ Requires-Dist: urllib3~=2.5.0
@@ -2,7 +2,7 @@ mm_http/__init__.py,sha256=vW7ASPktUjm6S2Q7_biiA4F_PzG7gPF8gK3E7bBO4yQ,212
2
2
  mm_http/http_request.py,sha256=3yapH-ADtSGqV7pMQj1cGWrGywDmRnTIE53AzM6ECtg,4116
3
3
  mm_http/http_request_sync.py,sha256=lajd4Xt_wHKuRYyPtybO5CHHvquLzGPZEMHzKjN1wlM,1819
4
4
  mm_http/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- mm_http/response.py,sha256=ajTjL3wWbYYt5OFD_IJ47pVRF7mwb1SX3QgCI-Ipfos,4049
6
- mm_http-0.0.3.dist-info/METADATA,sha256=UARW-4rzfSlXyxitc33qG0iDcNrC9W4liw9F6n1Jxhk,276
7
- mm_http-0.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- mm_http-0.0.3.dist-info/RECORD,,
5
+ mm_http/response.py,sha256=CCnL9COZvzP0kyAy6sASRbo1VtmnGsSiTd0kgvrt-MI,3036
6
+ mm_http-0.1.1.dist-info/METADATA,sha256=1G81d0jU3sRHTVbPfisvFUuTmlSex9RVaciihpIqzBE,274
7
+ mm_http-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ mm_http-0.1.1.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: mm-http
3
- Version: 0.0.3
4
- Requires-Python: >=3.13
5
- Requires-Dist: aiohttp-socks~=0.10.1
6
- Requires-Dist: aiohttp~=3.12.12
7
- Requires-Dist: mm-result>=0.0.4
8
- Requires-Dist: pydantic>=2.11.5
9
- Requires-Dist: pydash>=8.0.5
10
- Requires-Dist: requests[socks]~=2.32.4