quickspirit 2.0.1__py3-none-any.whl → 2.1.0__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.1.dist-info → quickspirit-2.1.0.dist-info}/METADATA +13 -6
- quickspirit-2.1.0.dist-info/RECORD +9 -0
- quickspirit-2.0.1.dist-info/RECORD +0 -9
- {quickspirit-2.0.1.dist-info → quickspirit-2.1.0.dist-info}/LICENSE +0 -0
- {quickspirit-2.0.1.dist-info → quickspirit-2.1.0.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.0
|
|
3
|
+
Version: 2.1.0
|
|
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
|
|
@@ -24,7 +24,7 @@ Requires-Dist: httpx (>=0.27.0)
|
|
|
24
24
|
Project-URL: Repository, https://github.com/DroidZed/QuickSpirit-Async
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
27
|
-
# Quick Spirit
|
|
27
|
+
# Quick Spirit 🐬
|
|
28
28
|
|
|
29
29
|
An easy to use HTTP client with a fast downloader.
|
|
30
30
|
|
|
@@ -52,7 +52,7 @@ uv add quickspirit
|
|
|
52
52
|
|
|
53
53
|
## Usage:
|
|
54
54
|
|
|
55
|
-
The library's
|
|
55
|
+
The library's internal mechanism returns a bytes data repersenting the bytes coming in from the network. Since we don't know the shape of the data, I delegated the responsibility to you to figure out how to parse it to your liking.
|
|
56
56
|
|
|
57
57
|
A sample code would look like this:
|
|
58
58
|
|
|
@@ -79,7 +79,7 @@ if __name__ == "__main__":
|
|
|
79
79
|
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
A complete example can be found in the `example` directory.
|
|
82
|
+
A complete example can be found in the [`example`](https://github.com/DroidZed/QuickSpirit-Async/tree/main/example) directory.
|
|
83
83
|
|
|
84
84
|
## Testing:
|
|
85
85
|
|
|
@@ -89,13 +89,17 @@ Clone with git:
|
|
|
89
89
|
git clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Create a virtual env:
|
|
92
|
+
Create a virtual env and install the dependencies in it:
|
|
93
93
|
|
|
94
94
|
```sh
|
|
95
95
|
python3 -m venv .venv && .venv/Scripts/activate
|
|
96
|
+
|
|
97
|
+
# I built the project using poetry, so you may want to have that inside of your venv ! No need to install it in your global python install.
|
|
98
|
+
poetry install --no-root
|
|
99
|
+
|
|
96
100
|
```
|
|
97
101
|
|
|
98
|
-
Run the tests with pytest
|
|
102
|
+
Run the tests with pytest:
|
|
99
103
|
|
|
100
104
|
```sh
|
|
101
105
|
# Here I'm using uv to run the tests, but the command should be the same for other package manager:
|
|
@@ -103,4 +107,7 @@ Run the tests with pytest (install it first using your package manager of choice
|
|
|
103
107
|
pytest -vs .
|
|
104
108
|
```
|
|
105
109
|
|
|
110
|
+
## Licensing
|
|
111
|
+
|
|
112
|
+
The project is under the GPT-3.0 License, see the [`License`](https://github.com/DroidZed/QuickSpirit-Async/blob/main/LICENSE) file for details.
|
|
106
113
|
|
|
@@ -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.0.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
7
|
+
quickspirit-2.1.0.dist-info/METADATA,sha256=AamSJn0xSvmcXFV2WLJvb8IkDCYRNe-bYGltbhHavUM,3106
|
|
8
|
+
quickspirit-2.1.0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
9
|
+
quickspirit-2.1.0.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.1.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
7
|
-
quickspirit-2.0.1.dist-info/METADATA,sha256=gyrEZZ72QzGX6797QxqOny-TCN36k5lJoCz51Kux9PI,2725
|
|
8
|
-
quickspirit-2.0.1.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
9
|
-
quickspirit-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|