ry stands for "repeat yourself" - the opposite of DRY.
Inspired by unasync, but built from the ground up for inline transformations and more flexible configurations.
Ry transforms the Python code using regex rules. Originally built to simplify maintaining dual async/sync codebases, but works for any pattern-based transformations.
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.
Installation
pip install ry-cli
Inline Transformations
Ry can transform not only whole files, but also specific lines or blocks of code based on inline comments.
class Response:
async def aclose(self) -> None: # unasync: generate
if self._stream_to_close is None:
return
if not isinstance(self._stream_to_close, AsyncClosableStream):
raise AsyncSyncMismatchError("Can't call `aclose` in this context")
await self._stream_to_close.aclose()
self._stream_to_close = None
+ def close(self) -> None: # unasync: generated
+ if self._stream_to_close is None:
+ return
+
+ if not isinstance(self._stream_to_close, AsyncClosableStream):
+ raise AsyncSyncMismatchError("Can't call `close` in this context")
+
+ self._stream_to_close.close()
+ self._stream_to_close = None
Usage
Validate without modifying files:
ry src/
Fixes all the fixable issues:
ry --fix src/
Metadata
Release files for ry-cli 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ry_cli-0.4.0.tar.gz | 980.6 kB | Without provenance | Details |
Built distributions (wheels)
Total release size: 16.4 MB
Release files / ry_cli-0.4.0.tar.gz
| Download URL | ry_cli-0.4.0.tar.gz |
|---|---|
| Size | 980.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e51dd3651bf9e513fabe33de19a071f25cbbddbd07160ff731a649f78d7e1d9d
|
|
BLAKE2b-256 checksum How to use checksums |
371612cf68564345d87d151b1dc2a1ff7699a51ebc6a560b660efc43fd7655a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-win_arm64.whl
| Download URL | ry_cli-0.4.0-py3-none-win_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
ea72ef8b8c3cb5c1e47ccec97339d8b983504984119c4d9fcb7e3d7607ccd348
|
|
BLAKE2b-256 checksum How to use checksums |
218b30309a3300535e6c59c214d26df327e9cc63b9228850383e0deeb60757b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-win_amd64.whl
| Download URL | ry_cli-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a7520c669372cdad1c081a89ee1663b9048083bcc4fe626daf0f0422634795fc
|
|
BLAKE2b-256 checksum How to use checksums |
762b20a209f03bb6cbb8695e9bc45adbed8d58932399fc9530814d6b2f2df554
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-win32.whl
| Download URL | ry_cli-0.4.0-py3-none-win32.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
a77558531c2873a5396dc42ea0f16972acdcbdaf8aeb18f7cbf92c940e5a6bf0
|
|
BLAKE2b-256 checksum How to use checksums |
87653322c9deb4585296e18214f587a3d25e75b37282fa57c9014ad850446ad5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | ry_cli-0.4.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
3389984e26892bbfe614f6fa38531ca2ca6086de3b1fc17a0243eb95c8dd14f2
|
|
BLAKE2b-256 checksum How to use checksums |
827989c03257666f2c9cabda4c817ba22d40a745a849c7efb798d147ebb00d46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | ry_cli-0.4.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
129fa8d938b225b2cfaea0a5961770cc11de1a7158c32acca2f1ea4c806c057a
|
|
BLAKE2b-256 checksum How to use checksums |
16d07a9e2e731f98fd8a2cc9e8f916a1b0ee2e12516b9a78e21ad8deb8f5b4cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ry_cli-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
8e41958bede447e133b1d0b13bf1b5e6acf1bba58dd9f8614fc17c95affdaedf
|
|
BLAKE2b-256 checksum How to use checksums |
0be86dc9be51d2cb454d955c612a9d39a81f086e64145f1a375cc75a5667ca0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | ry_cli-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux glibc 2.17+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
5e47c5d1df04e683774398781d746ab0cb303b95833a45630eaabb0a5ee296c0
|
|
BLAKE2b-256 checksum How to use checksums |
fce2eefa46c4b1b28fb8e5a40b7d11e471f653b503f13f678a32c0d478d50e16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | ry_cli-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.17+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
95127d03ac4b09ff7fc9454fb4afd15e6e97f7ccfe5159cbab6c1885e275746d
|
|
BLAKE2b-256 checksum How to use checksums |
1506c9466835a59750b9d66c069b9960113ccc9023ff895f76e47722b55e0c38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ry_cli-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
03559134a31907bec50366bd8def039d8f0caa6fa7b66bb55bd7bf77cae479a4
|
|
BLAKE2b-256 checksum How to use checksums |
9d9c3f79cbb06be3c10a4fffbbc588135d88ad7d5df6fb48b0f2f017863b82e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | ry_cli-0.4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ec6af88f24d8141b070596199b445940a825bcd472c51281d120ef90ee7b5a7e
|
|
BLAKE2b-256 checksum How to use checksums |
22cb8520e62c5b00bec5144cf5f6a4ec7dbdb0b426af8afe3c1abd6717f37cd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Release files / ry_cli-0.4.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | ry_cli-0.4.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
695a428aa1ef7ed042a8a0a64a67b618db449ecf1e879bb9acd574cad3aeda59
|
|
BLAKE2b-256 checksum How to use checksums |
5d7e1958a77fd1e0bf7c200c35258a1d82f2f8a38b934fc5773e12b32d07c9b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.13.1
|
Security for ry-cli 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.