reqora 0.1.0__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.
reqora-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,552 @@
1
+ Metadata-Version: 2.4
2
+ Name: reqora
3
+ Version: 0.1.0
4
+ Summary: AST-driven Python dependency discovery, resolution, and runtime provisioning engine.
5
+ Author: Pavan Kumar Korrapati
6
+ Project-URL: Homepage, https://github.com/pavankorrapati/TraceReq
7
+ Project-URL: Repository, https://github.com/pavankorrapati/TraceReq.git
8
+ Project-URL: Bug Tracker, https://github.com/pavankorrapati/TraceReq/issues
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+
12
+ # Reqora
13
+
14
+ **Reqora** is an AST-driven Python dependency discovery, resolution, and runtime provisioning engine.
15
+
16
+ It analyzes the Python file you want to execute, discovers its imported dependencies, recursively follows reachable local project imports, identifies third-party dependencies, maps Python import names to their corresponding PyPI packages, detects the appropriate Python environment, and installs missing dependencies automatically.
17
+
18
+ Reqora is designed to reduce the need to manually maintain a static `requirements.txt` file for every runtime scenario.
19
+
20
+ ---
21
+
22
+ ## How it works
23
+
24
+ ```text
25
+ Reqora source project
26
+
27
+
28
+ │ python -m build
29
+
30
+ dist/
31
+
32
+ ├── reqora-0.1.0-py3-none-any.whl
33
+ │ ← reusable Python package
34
+
35
+ └── reqora-0.1.0.tar.gz
36
+
37
+
38
+ │ pip install reqora
39
+
40
+
41
+ Any Python project
42
+
43
+ ├── .venv/
44
+ ├── tests/
45
+ ├── src/
46
+ ├── main.py
47
+ ├── script.py
48
+ └── ...
49
+
50
+
51
+ │ reqora script.py
52
+
53
+
54
+ Dependency Analysis
55
+
56
+
57
+ ├── Analyze script.py
58
+
59
+ ├── Find local imports
60
+
61
+ ├── Recursively analyze reachable
62
+ │ local dependency files
63
+
64
+ ├── Detect standard-library
65
+ │ dependencies
66
+
67
+ ├── Detect third-party
68
+ │ dependencies
69
+
70
+ ├── Map import names
71
+ │ → PyPI package names
72
+
73
+ ├── Detect the project's
74
+ │ appropriate virtual environment
75
+
76
+ └── Install missing dependencies
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Installation
82
+
83
+ Install Reqora from PyPI:
84
+
85
+ ```powershell
86
+ pip install reqora
87
+ ```
88
+
89
+ After installation, the `reqora` command is available.
90
+
91
+ ```powershell
92
+ reqora script.py
93
+ ```
94
+
95
+ Reqora analyzes the target Python application, resolves the required external packages, installs missing dependencies into the appropriate environment, and then proceeds with execution.
96
+
97
+ ---
98
+
99
+ ## Example
100
+
101
+ Suppose your project contains:
102
+
103
+ ```text
104
+ my_project/
105
+
106
+
107
+ ├── my_environment/
108
+ │ ├── pyvenv.cfg
109
+ │ └── Scripts/
110
+ │ └── python.exe
111
+
112
+ ├── script.py
113
+ ├── main.py
114
+ ├── services/
115
+ │ ├── __init__.py
116
+ │ └── api.py
117
+ └── utils/
118
+ └── helpers.py
119
+ ```
120
+
121
+ ### `script.py`
122
+
123
+ ```python
124
+ from main import run_application
125
+ ```
126
+
127
+ ### `main.py`
128
+
129
+ ```python
130
+ from services.api import get_data
131
+ from utils.helpers import process_data
132
+ ```
133
+
134
+ ### `services/api.py`
135
+
136
+ ```python
137
+ import requests
138
+ import yaml
139
+ ```
140
+
141
+ ### `utils/helpers.py`
142
+
143
+ ```python
144
+ import json
145
+ import os
146
+ ```
147
+
148
+ Run:
149
+
150
+ ```powershell
151
+ reqora script.py
152
+ ```
153
+
154
+ Reqora recursively analyzes the reachable local modules:
155
+
156
+ ```text
157
+ script.py
158
+
159
+
160
+ main.py
161
+
162
+ ├── services/api.py
163
+ │ ├── requests
164
+ │ └── yaml
165
+
166
+ └── utils/helpers.py
167
+ ├── json
168
+ └── os
169
+ ```
170
+
171
+ It understands that:
172
+
173
+ ```text
174
+ script.py
175
+ main.py
176
+ services/api.py
177
+ utils/helpers.py
178
+ ```
179
+
180
+ are local project files and should **not** be installed from PyPI.
181
+
182
+ It also recognizes:
183
+
184
+ ```text
185
+ json
186
+ os
187
+ ```
188
+
189
+ as Python standard-library modules.
190
+
191
+ The external dependencies requiring package resolution are therefore:
192
+
193
+ ```text
194
+ requests
195
+ yaml
196
+ ```
197
+
198
+ which are mapped to their corresponding PyPI distributions:
199
+
200
+ ```text
201
+ requests → requests
202
+ yaml → PyYAML
203
+ ```
204
+
205
+ Missing packages can then be installed into the detected Python environment.
206
+
207
+ ---
208
+
209
+ ## Recursive dependency analysis
210
+
211
+ Reqora is not limited to imports directly present in the file being executed.
212
+
213
+ For example:
214
+
215
+ ```text
216
+ script.py
217
+
218
+
219
+ main.py
220
+
221
+
222
+ service.py
223
+
224
+
225
+ repository.py
226
+
227
+
228
+ client.py
229
+
230
+ ├── requests
231
+ └── pydantic
232
+ ```
233
+
234
+ Starting with:
235
+
236
+ ```powershell
237
+ reqora script.py
238
+ ```
239
+
240
+ the dependency analyzer follows reachable local Python modules and builds the dependency graph.
241
+
242
+ This makes Reqora suitable for projects containing:
243
+
244
+ * Framework-based architectures
245
+ * `src/` layouts
246
+ * Service layers
247
+ * Repository layers
248
+ * Utility modules
249
+ * Internal Python packages
250
+ * Test frameworks
251
+ * Nested project modules
252
+ * Relative imports
253
+ * Package-based application structures
254
+
255
+ ---
256
+
257
+ ## Virtual environment detection
258
+
259
+ Reqora does not require a virtual environment to have one specific name.
260
+
261
+ It recognizes conventional names such as:
262
+
263
+ ```text
264
+ .venv
265
+ venv
266
+ env
267
+ .env
268
+ virtualenv
269
+ ```
270
+
271
+ but these names are not required.
272
+
273
+ For example, environments with names such as:
274
+
275
+ ```text
276
+ qa_environment/
277
+ automation_env/
278
+ python312/
279
+ company_python/
280
+ my_project_environment/
281
+ test_runtime/
282
+ anything_you_want/
283
+ ```
284
+
285
+ can also be identified when they have the expected Python virtual-environment structure.
286
+
287
+ On Windows, this may include:
288
+
289
+ ```text
290
+ pyvenv.cfg
291
+ Scripts/
292
+ python.exe
293
+ ```
294
+
295
+ On Linux/macOS:
296
+
297
+ ```text
298
+ pyvenv.cfg
299
+ bin/
300
+ python
301
+ ```
302
+
303
+ An already activated Python environment is also respected.
304
+
305
+ The objective is to identify the actual Python environment rather than relying exclusively on a hard-coded virtual-environment directory name.
306
+
307
+ ---
308
+
309
+ ## Command
310
+
311
+ Reqora provides the following command:
312
+
313
+ ```text
314
+ reqora
315
+ ```
316
+
317
+ Example:
318
+
319
+ ```powershell
320
+ reqora script.py
321
+ ```
322
+
323
+ The CLI uses:
324
+
325
+ ```text
326
+ auto_req.cli:main
327
+ ```
328
+
329
+ internally.
330
+
331
+ The public PyPI distribution name and CLI are:
332
+
333
+ ```text
334
+ reqora
335
+ ```
336
+
337
+ while the internal Python source package remains:
338
+
339
+ ```text
340
+ auto_req
341
+ ```
342
+
343
+ This separation allows the public project name to evolve independently from the internal Python package structure.
344
+
345
+ ---
346
+
347
+ ## Project structure
348
+
349
+ The source project follows this general structure:
350
+
351
+ ```text
352
+ TraceReq/
353
+
354
+
355
+ ├── auto_req/
356
+ │ ├── __init__.py
357
+ │ ├── analyzer.py
358
+ │ ├── installer.py
359
+ │ ├── cli.py
360
+ │ └── ...
361
+
362
+ ├── tests/
363
+
364
+ ├── README.md
365
+ ├── pyproject.toml
366
+ └── ...
367
+ ```
368
+
369
+ The Python import package is:
370
+
371
+ ```python
372
+ import auto_req
373
+ ```
374
+
375
+ The PyPI distribution is:
376
+
377
+ ```text
378
+ reqora
379
+ ```
380
+
381
+ Install it with:
382
+
383
+ ```powershell
384
+ pip install reqora
385
+ ```
386
+
387
+ The CLI is:
388
+
389
+ ```powershell
390
+ reqora
391
+ ```
392
+
393
+ ---
394
+
395
+ ## Building the package
396
+
397
+ From the TraceReq source project:
398
+
399
+ ```powershell
400
+ python -m build
401
+ ```
402
+
403
+ This generates:
404
+
405
+ ```text
406
+ dist/
407
+
408
+ ├── reqora-0.1.0-py3-none-any.whl
409
+ └── reqora-0.1.0.tar.gz
410
+ ```
411
+
412
+ The wheel is the primary reusable installation artifact.
413
+
414
+ Install the locally built wheel with:
415
+
416
+ ```powershell
417
+ pip install dist\reqora-0.1.0-py3-none-any.whl
418
+ ```
419
+
420
+ After installation:
421
+
422
+ ```powershell
423
+ reqora script.py
424
+ ```
425
+
426
+ ---
427
+
428
+ ## Publishing to PyPI
429
+
430
+ After validating the package:
431
+
432
+ ```powershell
433
+ python -m build
434
+ ```
435
+
436
+ verify the generated distributions:
437
+
438
+ ```powershell
439
+ python -m twine check .\dist\*
440
+ ```
441
+
442
+ The generated artifacts can then be uploaded to PyPI using your preferred publishing workflow.
443
+
444
+ The published distribution name is:
445
+
446
+ ```text
447
+ reqora
448
+ ```
449
+
450
+ Users can install it with:
451
+
452
+ ```powershell
453
+ pip install reqora
454
+ ```
455
+
456
+ ---
457
+
458
+ ## Goal
459
+
460
+ The primary goal of Reqora is to make Python project execution dependency-aware without requiring developers to manually maintain a static dependency file for every runtime scenario.
461
+
462
+ Instead of:
463
+
464
+ ```text
465
+ requirements.txt
466
+
467
+
468
+ pip install -r requirements.txt
469
+
470
+
471
+ run application
472
+ ```
473
+
474
+ the workflow becomes:
475
+
476
+ ```text
477
+ Python file
478
+
479
+
480
+ Reqora
481
+
482
+
483
+ Analyze dependency graph
484
+
485
+
486
+ Detect local modules
487
+
488
+
489
+ Detect standard-library modules
490
+
491
+
492
+ Detect external dependencies
493
+
494
+
495
+ Map imports → PyPI packages
496
+
497
+
498
+ Detect appropriate Python environment
499
+
500
+
501
+ Install missing dependencies
502
+
503
+
504
+ Execute the project
505
+ ```
506
+
507
+ This allows runtime dependency provisioning to work with both simple Python scripts and larger, framework-based projects.
508
+
509
+ ---
510
+
511
+ ## Intended user experience
512
+
513
+ The intended user experience is:
514
+
515
+ ```text
516
+ pip install reqora
517
+
518
+
519
+
520
+
521
+ ┌──────────────────────┐
522
+ │ reqora │
523
+ └──────────┬───────────┘
524
+
525
+
526
+ script.py
527
+
528
+
529
+ Analyze local imports
530
+
531
+
532
+ Recursively analyze
533
+ reachable local modules
534
+
535
+
536
+ Identify external imports
537
+
538
+
539
+ Map import → PyPI package
540
+
541
+
542
+ Detect appropriate Python
543
+ environment
544
+
545
+
546
+ Install missing packages
547
+
548
+
549
+ Execute project
550
+ ```
551
+
552
+ Reqora is intended to make dependency provisioning part of the execution workflow rather than a separate manual preparation step.