quickspirit 2.0.2__py3-none-any.whl → 2.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.
- quickspirit/http_async_client.py +8 -0
- quickspirit/models.py +1 -1
- {quickspirit-2.0.2.dist-info → quickspirit-2.1.1.dist-info}/METADATA +10 -6
- quickspirit-2.1.1.dist-info/RECORD +9 -0
- quickspirit-2.0.2.dist-info/RECORD +0 -9
- {quickspirit-2.0.2.dist-info → quickspirit-2.1.1.dist-info}/LICENSE +0 -0
- {quickspirit-2.0.2.dist-info → quickspirit-2.1.1.dist-info}/WHEEL +0 -0
quickspirit/http_async_client.py
CHANGED
|
@@ -21,6 +21,7 @@ class HttpAsyncClient:
|
|
|
21
21
|
json: Optional[Dict[str, Any]] = None,
|
|
22
22
|
headers: Optional[Dict[str, str]] = None,
|
|
23
23
|
url_params: Optional[Dict[str, Any]] = None,
|
|
24
|
+
files: Optional[Dict[str, Any]] = None,
|
|
24
25
|
) -> Result:
|
|
25
26
|
"""Make an HTTP request using the specified method.
|
|
26
27
|
|
|
@@ -56,6 +57,7 @@ class HttpAsyncClient:
|
|
|
56
57
|
json=json,
|
|
57
58
|
headers=headers,
|
|
58
59
|
params=url_params,
|
|
60
|
+
files=files,
|
|
59
61
|
)
|
|
60
62
|
|
|
61
63
|
response.raise_for_status()
|
|
@@ -97,6 +99,7 @@ class HttpAsyncClient:
|
|
|
97
99
|
json: Optional[Dict[str, Any]] = None,
|
|
98
100
|
headers: Optional[Dict[str, str]] = None,
|
|
99
101
|
url_params: Optional[Dict[str, Any]] = None,
|
|
102
|
+
files: Optional[Dict[str, Any]] = None,
|
|
100
103
|
) -> Result:
|
|
101
104
|
"""Make an HTTP POST request.
|
|
102
105
|
|
|
@@ -116,6 +119,7 @@ class HttpAsyncClient:
|
|
|
116
119
|
json=json,
|
|
117
120
|
headers=headers,
|
|
118
121
|
url_params=url_params,
|
|
122
|
+
files=files,
|
|
119
123
|
)
|
|
120
124
|
|
|
121
125
|
async def put(
|
|
@@ -125,6 +129,7 @@ class HttpAsyncClient:
|
|
|
125
129
|
json: Optional[Dict[str, Any]] = None,
|
|
126
130
|
headers: Optional[Dict[str, str]] = None,
|
|
127
131
|
url_params: Optional[Dict[str, Any]] = None,
|
|
132
|
+
files: Optional[Dict[str, Any]] = None,
|
|
128
133
|
) -> Result:
|
|
129
134
|
"""Make an HTTP PUT request.
|
|
130
135
|
|
|
@@ -144,6 +149,7 @@ class HttpAsyncClient:
|
|
|
144
149
|
json=json,
|
|
145
150
|
headers=headers,
|
|
146
151
|
url_params=url_params,
|
|
152
|
+
files=files,
|
|
147
153
|
)
|
|
148
154
|
|
|
149
155
|
async def patch(
|
|
@@ -153,6 +159,7 @@ class HttpAsyncClient:
|
|
|
153
159
|
json: Optional[Dict[str, Any]] = None,
|
|
154
160
|
headers: Optional[Dict[str, str]] = None,
|
|
155
161
|
url_params: Optional[Dict[str, Any]] = None,
|
|
162
|
+
files: Optional[Dict[str, Any]] = None,
|
|
156
163
|
) -> Result:
|
|
157
164
|
"""Make an HTTP PATCH request.
|
|
158
165
|
|
|
@@ -172,6 +179,7 @@ class HttpAsyncClient:
|
|
|
172
179
|
json=json,
|
|
173
180
|
headers=headers,
|
|
174
181
|
url_params=url_params,
|
|
182
|
+
files=files,
|
|
175
183
|
)
|
|
176
184
|
|
|
177
185
|
async def delete(
|
quickspirit/models.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: quickspirit
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Fast, Async Network & File Downloader Client In Python
|
|
5
5
|
Home-page: https://github.com/DroidZed/QuickSpirit-Async
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -68,10 +68,10 @@ async def main():
|
|
|
68
68
|
if result.Error:
|
|
69
69
|
raise result.Error
|
|
70
70
|
|
|
71
|
-
|
|
72
71
|
data: dict[str, Any] = loads(result.Data)
|
|
73
72
|
|
|
74
73
|
# do whatever you need now that you have the data...
|
|
74
|
+
print(data)
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
if __name__ == "__main__":
|
|
@@ -94,17 +94,21 @@ Create a virtual env and install the dependencies in it:
|
|
|
94
94
|
```sh
|
|
95
95
|
python3 -m venv .venv && .venv/Scripts/activate
|
|
96
96
|
|
|
97
|
-
# I built the project using poetry,
|
|
98
|
-
|
|
97
|
+
# I built the project using poetry,
|
|
98
|
+
# so you may want to have that inside of your venv !
|
|
99
|
+
# No need to install it in your global python install
|
|
99
100
|
|
|
101
|
+
pip install poetry
|
|
102
|
+
poetry install --no-root
|
|
100
103
|
```
|
|
101
104
|
|
|
102
105
|
Run the tests with pytest:
|
|
103
106
|
|
|
104
107
|
```sh
|
|
105
|
-
# Here I'm using uv to run the tests, but the command should be the same for other package manager:
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
# At the root of the project:
|
|
110
|
+
|
|
111
|
+
python -m pytest -vs .
|
|
108
112
|
```
|
|
109
113
|
|
|
110
114
|
## Licensing
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
quickspirit/__init__.py,sha256=JYvqruAR5WC_fAEPSLwJZbFcyg8VbTP9HpwPwhqBcsM,301
|
|
2
|
+
quickspirit/http_async_client.py,sha256=5Y2JhT2LOi226aW5j33WY2LXcDtEZIwsdwfVeRp_40E,6799
|
|
3
|
+
quickspirit/http_async_downloader.py,sha256=poOvyS8YjMo_E17LiI-klYStrLgRezSq7P0Y5MoQ7Tg,1073
|
|
4
|
+
quickspirit/http_errors.py,sha256=_Hsj_OAfllFjZkW5NjN9c4Qw8zsSg5M4eOnNyepOKCU,272
|
|
5
|
+
quickspirit/models.py,sha256=zresHK7qd4ns51bbTIjz6MOvafixAqmMwujIeF89oOI,198
|
|
6
|
+
quickspirit-2.1.1.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
7
|
+
quickspirit-2.1.1.dist-info/METADATA,sha256=3jH1XRdnh1wOoPXKyS8VjpQu5H1GTaeO0Arpn33ohWM,3080
|
|
8
|
+
quickspirit-2.1.1.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
9
|
+
quickspirit-2.1.1.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
quickspirit/__init__.py,sha256=JYvqruAR5WC_fAEPSLwJZbFcyg8VbTP9HpwPwhqBcsM,301
|
|
2
|
-
quickspirit/http_async_client.py,sha256=KFllZ4eYUgw9R_V9qajzHmwcCkui1BJEbix33fFH97w,6487
|
|
3
|
-
quickspirit/http_async_downloader.py,sha256=poOvyS8YjMo_E17LiI-klYStrLgRezSq7P0Y5MoQ7Tg,1073
|
|
4
|
-
quickspirit/http_errors.py,sha256=_Hsj_OAfllFjZkW5NjN9c4Qw8zsSg5M4eOnNyepOKCU,272
|
|
5
|
-
quickspirit/models.py,sha256=nQGsnaerR1DIUoIdjNFSoLQUc16QMJVXnBa9qTDEKIo,188
|
|
6
|
-
quickspirit-2.0.2.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
7
|
-
quickspirit-2.0.2.dist-info/METADATA,sha256=gFb1h4qHcM7U7UycWDih7HWfmsIGHT3Y0JgUYcwc8Lg,3106
|
|
8
|
-
quickspirit-2.0.2.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
9
|
-
quickspirit-2.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|