ry-cli 0.1.0__py3-none-win32.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.
Binary file
@@ -0,0 +1,76 @@
1
+ Metadata-Version: 2.4
2
+ Name: ry-cli
3
+ Version: 0.1.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.8
8
+ Classifier: Programming Language :: Python :: 3.9
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Rust
13
+ Classifier: Topic :: Software Development :: Code Generators
14
+ License-File: LICENSE
15
+ Summary: Repeat yourself - transform Python code using regex rules
16
+ Keywords: async,sync,code-generation,python,transformation
17
+ License: MIT
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
+
21
+ <div align="center">
22
+ <img src=".github/logo.png" alt="ry logo" width="600"/>
23
+ </div>
24
+
25
+ **ry** stands for "repeat yourself" - the opposite of DRY.
26
+
27
+ Inspired by [unasync](https://github.com/python-trio/unasync), but built from the ground up for inline transformations and more flexible configurations.
28
+
29
+ Ry transforms the Python code using regex rules. Originally built to simplify maintaining dual async/sync codebases, but works for any pattern-based transformations.
30
+
31
+ Comes with a package system where you can define reusable sets of rules. Have a built-in `std` package with all standard rules (like `async def` to `def`, etc), and you can create your own packages for your specific transformations.
32
+
33
+ ## Inline Transformations
34
+
35
+ Ry can transform not only whole files, but also specific lines or blocks of code based on inline comments.
36
+
37
+ ```diff
38
+ class Response:
39
+
40
+ async def aclose(self) -> None: # unasync: generate
41
+ if self._stream_to_close is None:
42
+ return
43
+
44
+ if not isinstance(self._stream_to_close, AsyncClosableStream):
45
+ raise AsyncSyncMismatchError("Can't call `aclose` in this context")
46
+
47
+ await self._stream_to_close.aclose()
48
+ self._stream_to_close = None
49
+
50
+ + def close(self) -> None: # unasync: generated
51
+ + if self._stream_to_close is None:
52
+ + return
53
+ +
54
+ + if not isinstance(self._stream_to_close, AsyncClosableStream):
55
+ + raise AsyncSyncMismatchError("Can't call `close` in this context")
56
+ +
57
+ + self._stream_to_close.close()
58
+ + self._stream_to_close = None
59
+
60
+ ```
61
+
62
+
63
+ ## Usage
64
+
65
+ Validate without modifying files:
66
+
67
+ ```bash
68
+ ry src/
69
+ ```
70
+
71
+ Fixes all the fixable issues:
72
+
73
+ ```bash
74
+ ry --fix src/
75
+ ```
76
+
@@ -0,0 +1,6 @@
1
+ ry_cli-0.1.0.data/scripts/ry.exe,sha256=yJ3W0sS82xIpASlJpWPD8WfhODpoazg2ZWHmRdch3oA,2603520
2
+ ry_cli-0.1.0.dist-info/METADATA,sha256=QW06DUdQypInxm6obmRRWlay0Js1twznujmaIZFqkiM,2545
3
+ ry_cli-0.1.0.dist-info/WHEEL,sha256=EhEEVp5UbN50kGKV3sjoeVxIjJjbF_KhOABUc2jiP2I,90
4
+ ry_cli-0.1.0.dist-info/licenses/LICENSE,sha256=Sv6SSe8KIhi65l0vo-vy3bd9OEzecYBfjgQGuS3y-Rg,1093
5
+ ry_cli-0.1.0.dist-info/sboms/ry.cyclonedx.json,sha256=5hR_bPLekD5nlFG6IHEcGR0x9NZVSiezx3CDcyJLqDE,50348
6
+ ry_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.12.6)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win32
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Karen Petrosyan
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.