quickspirit 2.0.0__tar.gz → 2.0.1__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.3
2
2
  Name: quickspirit
3
- Version: 2.0.0
3
+ Version: 2.0.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
@@ -50,6 +50,37 @@ poetry add quickspirit
50
50
  uv add quickspirit
51
51
  ```
52
52
 
53
+ ## Usage:
54
+
55
+ The library's getter function 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
+
57
+ A sample code would look like this:
58
+
59
+ ```py
60
+ from quickspirit import HttpAsyncClient
61
+ from asyncio import run
62
+ from json import joads
63
+ from typing import Any
64
+
65
+ async def main():
66
+ result = await HttpAsyncClient().get("https://some distant url returning json hopefully")
67
+
68
+ if result.Error:
69
+ raise result.Error
70
+
71
+
72
+ data: dict[str, Any] = loads(result.Data)
73
+
74
+ # do whatever you need now that you have the data...
75
+
76
+
77
+ if __name__ == "__main__":
78
+ run(main())
79
+
80
+ ```
81
+
82
+ A complete example can be found in the `example` directory.
83
+
53
84
  ## Testing:
54
85
 
55
86
  Clone with git:
@@ -0,0 +1,79 @@
1
+ # Quick Spirit
2
+
3
+ An easy to use HTTP client with a fast downloader.
4
+
5
+ This library was made with the famous [HTTPX](https://www.python-httpx.org/) library!
6
+
7
+ I originally intended to make a small module to refactor my networking layer in my apps using httpx, and ended up creating a library !
8
+
9
+ ----
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ # PIP:
15
+
16
+ pip install quickspirit
17
+
18
+ # Poetry:
19
+
20
+ poetry add quickspirit
21
+
22
+ # UV:
23
+
24
+ uv add quickspirit
25
+ ```
26
+
27
+ ## Usage:
28
+
29
+ The library's getter function 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.
30
+
31
+ A sample code would look like this:
32
+
33
+ ```py
34
+ from quickspirit import HttpAsyncClient
35
+ from asyncio import run
36
+ from json import joads
37
+ from typing import Any
38
+
39
+ async def main():
40
+ result = await HttpAsyncClient().get("https://some distant url returning json hopefully")
41
+
42
+ if result.Error:
43
+ raise result.Error
44
+
45
+
46
+ data: dict[str, Any] = loads(result.Data)
47
+
48
+ # do whatever you need now that you have the data...
49
+
50
+
51
+ if __name__ == "__main__":
52
+ run(main())
53
+
54
+ ```
55
+
56
+ A complete example can be found in the `example` directory.
57
+
58
+ ## Testing:
59
+
60
+ Clone with git:
61
+
62
+ ```bash
63
+ git clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async
64
+ ```
65
+
66
+ Create a virtual env:
67
+
68
+ ```sh
69
+ python3 -m venv .venv && .venv/Scripts/activate
70
+ ```
71
+
72
+ Run the tests with pytest (install it first using your package manager of choice):
73
+
74
+ ```sh
75
+ # Here I'm using uv to run the tests, but the command should be the same for other package manager:
76
+
77
+ pytest -vs .
78
+ ```
79
+
@@ -11,7 +11,7 @@ classifiers = [
11
11
  [project]
12
12
  name = "quickspirit"
13
13
  description = "Fast, Async Network & File Downloader Client In Python"
14
- version = "2.0.0"
14
+ version = "2.0.1"
15
15
  dynamic = [ "classifiers" ]
16
16
  license = { text = "GPL-3.0-or-later" }
17
17
  readme = "README.md"
@@ -1,48 +0,0 @@
1
- # Quick Spirit
2
-
3
- An easy to use HTTP client with a fast downloader.
4
-
5
- This library was made with the famous [HTTPX](https://www.python-httpx.org/) library!
6
-
7
- I originally intended to make a small module to refactor my networking layer in my apps using httpx, and ended up creating a library !
8
-
9
- ----
10
-
11
- ## Install
12
-
13
- ```sh
14
- # PIP:
15
-
16
- pip install quickspirit
17
-
18
- # Poetry:
19
-
20
- poetry add quickspirit
21
-
22
- # UV:
23
-
24
- uv add quickspirit
25
- ```
26
-
27
- ## Testing:
28
-
29
- Clone with git:
30
-
31
- ```bash
32
- git clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async
33
- ```
34
-
35
- Create a virtual env:
36
-
37
- ```sh
38
- python3 -m venv .venv && .venv/Scripts/activate
39
- ```
40
-
41
- Run the tests with pytest (install it first using your package manager of choice):
42
-
43
- ```sh
44
- # Here I'm using uv to run the tests, but the command should be the same for other package manager:
45
-
46
- pytest -vs .
47
- ```
48
-
File without changes