pytrace-inject 0.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.
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytrace-inject
3
+ Version: 0.1.0
4
+ Summary: Runtime AOP injection for Python — intercept and modify local variables at any execution point
5
+ Project-URL: Homepage, https://github.com/YuYi-09/pytrace-inject
6
+ Project-URL: Repository, https://github.com/YuYi-09/pytrace-inject
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+
17
+ # pytrace-inject: Runtime AOP injection for Python.
18
+
19
+ A lightweight framework that lets you intercept and modify local variables
20
+ at any execution point of a target function, using `sys.settrace`.
21
+
22
+ ## Quick Start
23
+ ```python
24
+ import random
25
+ from pytrace_inject import At, inject, start_trace, end_trace
26
+
27
+ @inject(At(random.randrange).atcall())
28
+ def modify(start, end):
29
+ start, end = 42, 43
30
+ return {'start': start, 'end': end}
31
+
32
+ start_trace()
33
+ print(random.randrange(100, 999)) # Output: 42
34
+ end_trace()
35
+ ```
36
+
37
+ ## Key Concepts
38
+ - **At** — Where to inject (call time / return time / specific line / custom condition).
39
+ - **Tracer** — The active injection, can be `.remove()`'d at any time.
40
+ - **Callback** — Your function that receives current local variables
41
+ and returns a `dict` of replacements (or `None`).
42
+
43
+ ## License
44
+ MIT — see [LICENSE](LICENSE) file.
@@ -0,0 +1,5 @@
1
+ pytrace_inject-0.1.0.dist-info/licenses/LICENSE,sha256=F35SRyYGIPJZNxz2a1sFoX6hyMZzBFgg9hswwo-DVz0,1083
2
+ pytrace_inject-0.1.0.dist-info/METADATA,sha256=vE1fMYsdUaYyzg9lz9PVX0ZMU6sOJfHBoIfjNsV89dk,1695
3
+ pytrace_inject-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ pytrace_inject-0.1.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
+ pytrace_inject-0.1.0.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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 YuYi-09
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.