AsyncLoad 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.
@@ -0,0 +1,257 @@
1
+ Metadata-Version: 2.4
2
+ Name: AsyncLoad
3
+ Version: 0.1.1
4
+ Summary: Asynchronous HTTP Load Testing Tool with Database Storage and Betterstack Integration
5
+ Home-page: https://github.com/Saptarshi2001/pyload
6
+ Author: Saptarshi Dutta
7
+ Author-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
8
+ Maintainer-email: Saptarshi Dutta <saptarshidutta2001@gmail.com>
9
+ License: MIT License
10
+
11
+ Copyright (c) 2025 Your Name
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+
31
+ Project-URL: Homepage, https://github.com/Saptarshi2001/AsyncLoad
32
+ Project-URL: Documentation, https://github.com/Saptarshi2001/AsyncLoad#readme
33
+ Project-URL: Repository, https://github.com/Saptarshi2001/AsyncLoad
34
+ Project-URL: Issues, https://github.com/Saptarshi2001/AsyncLoad/issues
35
+ Project-URL: Changelog, https://github.com/Saptarshi2001/AsyncLoad/blob/main/CHANGELOG.md
36
+ Keywords: load-testing,http,async,aiohttp,performance,monitoring,betterstack
37
+ Classifier: Development Status :: 4 - Beta
38
+ Classifier: Intended Audience :: Developers
39
+ Classifier: Intended Audience :: System Administrators
40
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
41
+ Classifier: Topic :: Software Development :: Testing :: Traffic Generation
42
+ Classifier: Topic :: System :: Benchmark
43
+ Classifier: License :: OSI Approved :: MIT License
44
+ Classifier: Programming Language :: Python :: 3
45
+ Classifier: Programming Language :: Python :: 3.7
46
+ Classifier: Programming Language :: Python :: 3.8
47
+ Classifier: Programming Language :: Python :: 3.9
48
+ Classifier: Programming Language :: Python :: 3.10
49
+ Classifier: Programming Language :: Python :: 3.11
50
+ Classifier: Operating System :: OS Independent
51
+ Classifier: Framework :: AsyncIO
52
+ Requires-Python: >=3.7
53
+ Description-Content-Type: text/markdown
54
+ License-File: LICENSE
55
+ Requires-Dist: aiohttp>=3.7.0
56
+ Requires-Dist: requests>=2.25.0
57
+ Requires-Dist: python-dotenv>=0.15.0
58
+ Requires-Dist: logtail>=1.0.1
59
+ Provides-Extra: dev
60
+ Requires-Dist: pytest>=6.0.0; extra == "dev"
61
+ Requires-Dist: pytest-asyncio>=0.14.0; extra == "dev"
62
+ Requires-Dist: coverage>=5.0.0; extra == "dev"
63
+ Requires-Dist: black>=21.0.0; extra == "dev"
64
+ Requires-Dist: flake8>=3.8.0; extra == "dev"
65
+ Provides-Extra: test
66
+ Requires-Dist: pytest>=6.0.0; extra == "test"
67
+ Requires-Dist: pytest-asyncio>=0.14.0; extra == "test"
68
+ Dynamic: author
69
+ Dynamic: home-page
70
+ Dynamic: license-file
71
+ Dynamic: requires-python
72
+
73
+ # AsyncLoad
74
+
75
+ AsyncLoad is an asynchronous load testing CLI designed to stress test your applications under heavy concurrent load. It contains database storage for session history as well as a Betterstack integration for monitoring and observability.
76
+
77
+ ---
78
+
79
+ ## Installation
80
+
81
+ ### Install from pip
82
+
83
+ For version releases, use pip:
84
+
85
+ ```bash
86
+ pip install async-load-tester
87
+ asyncload -setup
88
+
89
+ Set your betterstack env variables inside the global config file thats created."%LOCALAPPDATA%/loadtester/config.env" for Windows,"~/.config/loadtester/config.env" for linux and Mac. You can setup the number of requests,concurrent requests, as well as the http method either in the config file or simply use the cmd flags to override the values. Default values for number of requests,concurrent requests,http method is 100,10,GET.
90
+
91
+ ```
92
+ Head over to your cmd and type:
93
+
94
+ ```bash
95
+ asyncload https://httpbin.org/ -n 100 -c 10 -GET
96
+ ```
97
+
98
+ ### Install from GitHub source
99
+
100
+ For building from source, install directly from the git repository:
101
+
102
+ ```bash
103
+ git clone <repository-url>
104
+ cd Asyncload
105
+ pip install .
106
+ cp config.env.example config.env # set up your config file
107
+ python -m unittest discover tests/ # Run all tests
108
+ asyncload https://httpbin.org/ -n 100 -c 10 -GET
109
+ ```
110
+
111
+ Or Use Docker to build and run the source:
112
+
113
+ ```bash
114
+ docker compose build
115
+ docker compose run --rm asyncload https://httpbin.org/ -n 100 -c 10 -GET
116
+ ```
117
+
118
+
119
+ ### Running the tests
120
+
121
+ ```bash
122
+ # Run all tests
123
+ python -m unittest discover tests/
124
+
125
+ # Run specific test modules
126
+ python -m unittest tests.testload
127
+ python -m unittest tests.testasync
128
+ python -m unittest tests.testdb
129
+
130
+ # Run with verbose output
131
+ python -m unittest -v tests.testload
132
+ ```
133
+
134
+
135
+
136
+
137
+
138
+ ## Examples
139
+
140
+ ```bash
141
+ # Basic GET request
142
+ asyncload https://jsonplaceholder.typicode.com/posts -n 1000 -c 50 -GET
143
+
144
+ # Test user creation endpoint
145
+ asyncload https://reqres.in/api/users -n 100 -c 10 -POST -d '{"name": "John Doe", "job": "developer"}'
146
+
147
+ # High concurrency test
148
+ asyncload https://httpbin.org/delay/1 -n 1000 -c 100 -GET
149
+
150
+ # Stress test with timeout
151
+ asyncload https://httpbin.org/delay/2 -n 100 -c 10 -GET
152
+
153
+
154
+ ```
155
+
156
+ ---
157
+
158
+ ## API Reference
159
+
160
+ ### ensure_global_config()
161
+
162
+ Creates the global config file in the user's system
163
+
164
+ ### read()
165
+
166
+ Reads the command line arguments before executing the load test.
167
+
168
+ ---
169
+
170
+ ### testurl(url, numreq, conreq, reqtype, headers=None)
171
+
172
+ The core function of AsyncLoad. Sends requests to the specified URL asynchronously.
173
+
174
+ **Parameters:**
175
+
176
+ | Name | Type | Description |
177
+ |------|------|-------------|
178
+ | `url` | `str` | The URL to test |
179
+ | `numreq` | `int` | Number of total requests |
180
+ | `conreq` | `int` | Number of concurrent requests |
181
+ | `reqtype` | `str` | HTTP method (GET, POST, PUT, DELETE, etc.) |
182
+ | `headers` | `dict` | Optional HTTP headers |
183
+
184
+ ---
185
+
186
+ ### insertpayload(reqlist)
187
+
188
+ Stores the return values from the requests in an SQLite database instance.
189
+
190
+ **Parameters:**
191
+
192
+ | Name | Type | Description |
193
+ |------|------|-------------|
194
+ | `reqlist` | `list` | List of request results to store |
195
+
196
+ ---
197
+
198
+ ### history(timemode=None)
199
+
200
+ Retrieves the session history from the database instance.
201
+
202
+ **Parameters:**
203
+
204
+ | Name | Type | Description |
205
+ |------|------|-------------|
206
+ | `timemode` | `str` | Optional filter: 'weekly', 'monthly', or 'yearly' |
207
+
208
+ ---
209
+
210
+ ### stats(totresponsetime, firstbytetime, lastbytetime)
211
+
212
+ Calculates minimum, maximum, and average of total response time, first byte time, and last byte time.
213
+
214
+ **Parameters:**
215
+
216
+ | Name | Type | Description |
217
+ |------|------|-------------|
218
+ | `totresponsetime` | `list` | List of total response times |
219
+ | `firstbytetime` | `list` | List of first byte times |
220
+ | `lastbytetime` | `list` | List of last byte times |
221
+
222
+
223
+ ---
224
+
225
+ ### desc()
226
+
227
+ Displays the load test statistics in the terminal.
228
+
229
+
230
+
231
+ ### Options
232
+
233
+ | Flag | Description |
234
+ |------|-------------|
235
+ | `-n` | Number of requests |
236
+ | `-c` | Number of concurrent requests |
237
+ | `-GET` / `-POST` / `-DELETE` / `-PUT` / `-HEAD` / `-PATCH` | HTTP method |
238
+ | `-d` | JSON data for POST/PUT/PATCH/DELETE |
239
+ | `-history` | View session history |
240
+ | `-history -weekly` | View weekly session history |
241
+ | `-history -monthly` | View monthly session history |
242
+ | `-history -yearly` | View yearly session history |
243
+
244
+ ---
245
+
246
+ ## Changelog
247
+
248
+ ### [1.0.0] - 2026-05-11
249
+ #### Added
250
+ - Initial release of AsyncLoad
251
+ - Asynchronous load testing CLI with concurrent request support
252
+ - Database storage for session history using SQLite
253
+ - Betterstack integration for monitoring and observability
254
+ - Support for multiple HTTP methods (GET, POST, PUT, DELETE, HEAD, PATCH)
255
+ - Configurable concurrency and request count
256
+ - Session history viewing (weekly, monthly, yearly)
257
+ - Load testing stats
@@ -0,0 +1,6 @@
1
+ asyncload-0.1.1.dist-info/licenses/LICENSE,sha256=l6425dmjnidzk4JQwhT01C8SpICmjSBMNREAdPnPA9E,1087
2
+ asyncload-0.1.1.dist-info/METADATA,sha256=uXA6Jxvn-LVYbIgFHQI1sOjDkQIvLgge7qRQadSZ5SQ,8368
3
+ asyncload-0.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ asyncload-0.1.1.dist-info/entry_points.txt,sha256=Y0hNqAIqXHXbYgMeFF6rLKpe3bGQaGGSV42R2ETzYTQ,45
5
+ asyncload-0.1.1.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ asyncload-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ asyncload = asyncload:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+